Results 1 to 13 of 13

Thread: To C# or not To C#

  1. #1
    BG
    Guest

    To C# or not To C#

    Aight, has anyone played with C#. I've been using vb instead of visual C++ because I havn't had to. Are ther any major advantages to C# over vb.net?

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Not really. C# and VB.net performs virtually the under the .net framework. I think its a matter of preference.

    If you like the C++ or Java like syntax of C#, then go with C#, or if you like the VB syntax, then go with vb.net.

    However C# does have a few advantages over vb.net, but its mostly complex, for example pointers. You can declare pointers explicitly in C# but you would have to use the unsafe keyword, since you would be using it in a managed environment.

    If you know C#, then it would be fairly easy to do the same thing in VB.NET, by only changing the syntax.

    Right I'm writing a program in C# after switching from VB.NET. It took me 1 night to re-write the code which took me 2 nights in vb.net. That was possible because I already knew the C++ syntax and because C# and vb.net does practically everything the same way.

    Hope that helps
    Dont gain the world and lose your soul

  3. #3
    BG
    Guest
    Yup, That's what I was hoping to hear. Thanks.

  4. #4
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327
    If you are dealing with unmanaged c++ code, c# might have a slight advantage.

    VB.net doesn't do some of the value types that are common in C++, like ushort and ulong etc.

    That's probably one of the few things VB.net can't do that c# can. Otherwise it's just your preference in syntax.

    One last thing, and everyone can correct me if I'm wrong, but it seemed like MSDN had more examples in C# than VB...
    I could be wrong.
    -scott
    he he he

  5. #5
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    no you are right. MS is trying to drill it down people throats..namely Java developers. The realize VB examples wont bring in the C and Java devs, so they show as much c# as possible.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  6. #6
    Jethro
    Guest
    That C# stuff was a suprised, we loaded it out of interest, then thought what a load of crap Just go with vb

  7. #7
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    C# kicks ass
    Dont gain the world and lose your soul

  8. #8
    Jethro
    Guest
    Originally posted by DevGrp
    C# kicks ass
    How so?

  9. #9
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    That C# stuff was a suprised, we loaded it out of interest, then thought what a load of crap Just go with vb
    You probably have'nt used any other language other than VB.

    Try it, and you'll see. Although you can do the same thing in VB.NET and C#. The code in C# is alot cleaner. Event handling is also simpler than VB.NET's event handling.
    Dont gain the world and lose your soul

  10. #10
    Jethro
    Guest
    Originally posted by DevGrp


    You probably have'nt used any other language other than VB.

    Try it, and you'll see. Although you can do the same thing in VB.NET and C#. The code in C# is alot cleaner. Event handling is also simpler than VB.NET's event handling.
    Er actually

    VB
    Delphi
    C
    C++
    COBOL
    Universe Basic
    SB+
    Progress
    Pick Basic
    Information Basic
    System Builder
    Revelation
    Open Access


    and probably a few more that don't use currently

  11. #11
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327
    Er...regardless,
    DevGrp is right. C# is cool!

    All I'm saying is don't knock it 'till you try it. The ease of use of VB is there without all the sissy for / next, sub / end sub rigamarole. And, you can't beet the += syntax for adding delegates to events etc.

    I programmed with VB for years, but I can't imagine going back and doing VB.net after learning C#. It's just a chore to me now.

    Anyway, take it or leave it. But, that's my two bits.
    -scott
    he he he

  12. #12
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327
    oops you beat me to the response DevGrp

    (you're still right)
    -scott
    he he he

  13. #13
    BG
    Guest
    OK, I have been using C# and vb.net for a week. I have used C++ in the past and this helped out a lot. C# is much cleaner and eaiser to understand(If you have used C before). Unfortunatly I'm the only on one my development team who has so looks l'm going to have to use vb for the user interface stuff. At least I can use C# for the stuff no one else will ever have to work with

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