Thread: convert vb.net code to C#

  1. #1
    Registered User Nyoud33's Avatar
    Join Date
    Jan 2009
    Posts
    5

    convert vb.net code to C#

    hi

    when trying to write a vb program in C# I faced this problem:

    Code:
    dim params As New Generic.List(Of SqlParameter)
            params.Add(New SqlParameter("@x1", b.Auteur))
            params.Add(New SqlParameter("@x2", b.Titel))
    do u know how to write this in C#, can u plz help?

    thank u

  2. #2
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    Probably
    Code:
    System.Generic.List<SqlParameter> params = new System.Generic.List<SqlParameter>();
    params.Add(new SqlParameter("@x1", b.Auteur));
    params.Add(new SqlParameter("@x2", b.Titel));
    Woop?

  3. #3
    Registered User Nyoud33's Avatar
    Join Date
    Jan 2009
    Posts
    5
    thx so much

  4. #4
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    Location
    RING 0
    Posts
    507
    If its a large program couldn't you just reference the VB compiled assembly in your c-sharp app and go from there? IE invoke the classes that were created in the VB.net app.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 23
    Last Post: 04-20-2009, 07:35 AM
  2. how to convert decimal number to ASCII code?
    By oie in forum C Programming
    Replies: 11
    Last Post: 11-03-2006, 06:19 PM
  3. Explain this C code in english
    By soadlink in forum C Programming
    Replies: 16
    Last Post: 08-31-2006, 12:48 AM
  4. Seems like correct code, but results are not right...
    By OmniMirror in forum C Programming
    Replies: 4
    Last Post: 02-13-2003, 01:33 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM