Last visit was: It is currently Thu Mar 28, 2024 7:58 am


All times are UTC-05:00




Post new topic Reply to topic  [9 posts ] 
    Author Message
     Post subject:VB.net Vs C#
    PostPosted:Sun Feb 24, 2008 11:16 am 
     

    Joined:Sun Jun 10, 2007 11:41 am
    Posts:344
    Location:Ninjaville
    So I've recently begun learning C# because I want to try writing a game using XNA, however it is a lot harder than VB.net and I was wondering, is there any real advantages? VB.Net is actually a very powerful language and is much easier too write in. I know many people consider it a "fake" language but considering the fact that both VB.Net and C# are .Net languages I see no reason why C# would be more powerful.


    Top
    Offline  
     Post subject:Re: VB.net Vs C#
    PostPosted:Sun Feb 24, 2008 3:04 pm 
    Literally Nine
    User avatar
     

    Joined:Sat Apr 02, 2005 3:31 pm
    Posts:1171
    Location:The vicinity of an area adjacent to a location.
    C# and VB.NET are basically the same language. They both compile to MSIL, both use the .NET Framework, so they both are equivalent in speed and functionality. The only difference between the two is the syntax, essentially.

    I recommend C# though because it has a more C/C++-like syntax than VB.NET. But that's personal preference.

    _________________
    - Tycho

    Image


    Top
    Offline  
     Post subject:Re: VB.net Vs C#
    PostPosted:Sun Feb 24, 2008 5:38 pm 
     

    Joined:Sun Jun 10, 2007 11:41 am
    Posts:344
    Location:Ninjaville
    I knew that they both compiled to MSIL, however I was under the impression that C# was a faster language because it's dependacies carried a lighter load, I guess not.

    I know that C# is closer to C\C++ however VB.Net is infinitely easier to use, I am confused as to why I can't write games in XNA studio using VB.Net a language that I am proficient in as opposed to C# which I am currently teaching myself.


    Top
    Offline  
     Post subject:Re: VB.net Vs C#
    PostPosted:Sun Feb 24, 2008 7:07 pm 
    Literally Nine
    User avatar
     

    Joined:Sat Apr 02, 2005 3:31 pm
    Posts:1171
    Location:The vicinity of an area adjacent to a location.
    I think Microsoft is working very hard to obsolete VB. It's understandable, but disappointing at the same time. The first programming language I really learned was VB 6, and then Microsoft came out with VB.NET which was so different it wasn't even funny.

    _________________
    - Tycho

    Image


    Top
    Offline  
     Post subject:Re: VB.net Vs C#
    PostPosted:Sun Feb 24, 2008 8:14 pm 
    User avatar
     

    Joined:Sat Jun 03, 2006 3:51 am
    Posts:1186
    Website:http://griffinhart.livejournal.com/
    Yahoo Messenger:Squall591
    AOL:FinalWarrior591
    Location:Look at my horse, my horse is amazing!
    Quote:
    I am confused as to why I can't write games in XNA studio using VB.Net a language that I am proficient in as opposed to C# which I am currently teaching myself.
    Oh, well that's simple.

    Because Microsoft doesn't want XNA games in VB.net, they want them in C#.

    Really though, you're asking this question to the wrong people. AFAIK, none of us are MS/XNA reps.

    -- Griffinhart

    _________________
    "My word is my honor. My honor is my life."
    -- Demonchild, Angelkin, the Blackest Seraph, the Final Warrior

    Image


    Top
    Offline  
     Post subject:Re: VB.net Vs C#
    PostPosted:Sun Feb 24, 2008 8:16 pm 
    User avatar
     

    Joined:Sun Feb 12, 2006 8:56 pm
    Posts:1019
    Website:http://eddieringle.com
    Location:Detroit, MI
    Yeah, XNA is just another marketing scheme, it's how Microsoft is getting people to switch from VB.NET to C#.

    _________________
    -- Eddie Ringle

    Check out Elysian Shadows and consider backing us on Kickstarter!

    ====================================

    Image


    Top
    Offline  
     Post subject:Re: VB.net Vs C#
    PostPosted:Sun Feb 24, 2008 8:25 pm 
     

    Joined:Sun Jun 10, 2007 11:41 am
    Posts:344
    Location:Ninjaville
    I couldn't see VB.Net being obsoleted it is clearly the easiest programming language on the market today. A non-programmer could understand simple programs just by looking at code.


    Top
    Offline  
     Post subject:Re: VB.net Vs C#
    PostPosted:Tue Feb 26, 2008 1:51 am 
     

    Joined:Sat Feb 16, 2008 6:39 pm
    Posts:18
    Location:Amsterdam - The Netherlands
    Well at the moment i haven't been able to contact DLL's from other apps from VB.net but i haven't spend too much time in the language as I'm a die hard VB6 coder... ( i know, i know, but this has to do with my lack of interest for ASP.net so i still use classic ASP which doesn't like vb.net code)

    I started with C# not to long ago as well and between the two, they both have about the same learning curve, the syntax of C# is a general C type coding system (Java, J#, C, C++) they all look alike.

    Did a search through MSDN's blog for you, it's from 2004 though but it should suffice.

    VB.NET Advantages
    Support for optional parameters - very handy for some COM interoperability
    Support for late binding with Option Strict off - type safety at compile time goes out of the window, but legacy libraries which don't have strongly typed interfaces become easier to use.
    Support for named indexers (aka properties with parameters).
    Various legacy VB functions (provided in the Microsoft.VisualBasic namespace, and can be used by other languages with a reference to the Microsoft.VisualBasic.dll). Many of these can be harmful to performance if used unwisely, however, and many people believe they should be avoided for the most part.
    The with construct: it's a matter of debate as to whether this is an advantage or not, but it's certainly a difference.
    Simpler (in expression - perhaps more complicated in understanding) event handling, where a method can declare that it handles an event, rather than the handler having to be set up in code.
    The ability to implement interfaces with methods of different names. (Arguably this makes it harder to find the implementation of an interface, however.)
    Catch ... When ... clauses, which allow exceptions to be filtered based on runtime expressions rather than just by type.
    The VB.NET part of Visual Studio .NET compiles your code in the background. While this is considered an advantage for small projects, people creating very large projects have found that the IDE slows down considerably as the project gets larger.

    C# Advantages
    XML documentation generated from source code comments. (This is coming in VB.NET with Whidbey (the code name for the next version of Visual Studio and .NET), and there are tools which will do it with existing VB.NET code already.)
    Operator overloading - again, coming to VB.NET in Whidbey.
    Language support for unsigned types (you can use them from VB.NET, but they aren't in the language itself). Again, support for these is coming to VB.NET in Whidbey.
    The using statement, which makes unmanaged resource disposal simple.
    Explicit interface implementation, where an interface which is already implemented in a base class can be reimplemented separately in a derived class. Arguably this makes the class harder to understand, in the same way that member hiding normally does.
    Unsafe code. This allows pointer arithmetic etc, and can improve performance in some situations. However, it is not to be used lightly, as a lot of the normal safety of C# is lost (as the name implies). Note that unsafe code is still managed code, i.e. it is compiled to IL, JITted, and run within the CLR.
    Despite the fact that the above list appears to favour VB.NET (if you don't mind waiting for Whidbey), many people prefer C#'s terse syntax enough to make them use C# instead.

    _________________
    -Dorb

    Image


    Top
    Offline  
     Post subject:Re: VB.net Vs C#
    PostPosted:Tue Feb 26, 2008 3:27 pm 
    User avatar
     

    Joined:Sat Jun 03, 2006 3:51 am
    Posts:1186
    Website:http://griffinhart.livejournal.com/
    Yahoo Messenger:Squall591
    AOL:FinalWarrior591
    Location:Look at my horse, my horse is amazing!
    Quote:
    Yeah, XNA is just another marketing scheme, it's how Microsoft is getting people to switch from VB.NET to C#.
    Oh really? Because, AFAICT, it's just a way to facilitate indie gaming. I mean, if someone really badly wanted to write a game in VB.net instead of C#, they would. It's not like Microsoft is enforcing a military embargo on VB.net or something. They just chose to have XNA games programmed in C#.

    -- Griffinhart

    _________________
    "My word is my honor. My honor is my life."
    -- Demonchild, Angelkin, the Blackest Seraph, the Final Warrior

    Image


    Top
    Offline  
    Display posts from previous: Sort by 
    Post new topic Reply to topic

      All times are UTC-05:00


      Who is online

      Users browsing this forum: No registered users and 16 guests


      You cannot post new topics in this forum
      You cannot reply to topics in this forum
      You cannot edit your posts in this forum
      You cannot delete your posts in this forum
      You cannot post attachments in this forum

      Search for:
      Jump to:  
      Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
      Theme created by Miah with assistance from hyprnova