CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2010
    Posts
    36

    What is the C# equiv to List(Of SqlParameter)) ?

    I am trying to pass a list of SQLParamaters to an object and Cimperiali was kind enough to give me the code I needed but it was in VB.Net. I am writting my code in C# and can not figure out what the C# version of List(Of SqlParameter)) would be. I used an online converted that told me it was List<SqlParameter> but that does not seem to be working as I get the error "The namespace name List could not be found"

  2. #2
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: What is the C# equiv to List(Of SqlParameter)) ?

    Hi there,

    List<SqlParameter> seems ok. Perhaps you can show us more of the code you have used and also include the using statements at the top of the file. Chances are you are missing a reference to System.Collections.Generic where List<T> is defined.

  3. #3
    Join Date
    Feb 2010
    Posts
    36

    Re: What is the C# equiv to List(Of SqlParameter)) ?

    Quote Originally Posted by nelo View Post
    Hi there,

    List<SqlParameter> seems ok. Perhaps you can show us more of the code you have used and also include the using statements at the top of the file. Chances are you are missing a reference to System.Collections.Generic where List<T> is defined.
    The code is at home and I am at work but I am 99% sure I forgot the sysmte.collections.generic reference. When I get home I will check it and update. Thanks!

  4. #4
    Join Date
    Feb 2010
    Posts
    36

    Re: What is the C# equiv to List(Of SqlParameter)) ?

    Just checked the code. I was missing the collections call. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured