Results 1 to 11 of 11

Thread: C# or VB.NET

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2003
    Location
    Auckland
    Posts
    1,139

    C# or VB.NET

    I've made a few programs in VB.NET and i've still got loads and loads to learn just taking each hurdle as it comes, I've been looking at simple game examples now and they seem to all be done in C# so was thinking what is the difference other than the format of the code, I've googled it but a lot of search results talk about the difference in code not the difference in performance or capabilities...

    Can someone please explain it to me, if I want to make powerful programs and games later on is it better to switch and start learning c#?

  2. #2
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: C# or VB.NET

    As true today as when I first wrote it Visual Basic vs C#

  3. #3
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: C# or VB.NET

    kiwis, one thing most people fail to realize is that c#, vb.net, c++.net, j#, etc all run on the same framework which means all the c# managed code and all the vb.net code is running on the same framework inside the same clr. So performance really only matters when you start including things (dll's, com objects) that dont run on the .net framework otherwise vb.net and c# run with the same performance. It also helps to know that when vb.net and c# get compiled to the MSIL code, the MSIL code is virtually identical, there's extremely subtle differences between the two once compiled.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2003
    Location
    Auckland
    Posts
    1,139

    Re: C# or VB.NET

    but for advanced programs and games which will almost always use dll's it's better to learn C# or C++

    What about those two what's the difference?

  5. #5
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: C# or VB.NET

    It's still a subjective thing, really you should know as much as one as you should the other, I started with VB and changed to C# because that is the way jobs are going in Ireland but I still do the odd program in VB because sometimes its better to have both on your CV.

    As JB said the differences are few and far between and knowing the framework is the key to advancing your knowledge!

  6. #6
    Addicted Member Dark Anima's Avatar
    Join Date
    Sep 2008
    Posts
    183

    Re: C# or VB.NET

    Quote Originally Posted by JuggaloBrotha View Post
    kiwis, one thing most people fail to realize is that c#, vb.net, c++.net, j#, etc all run on the same framework which means all the c# managed code and all the vb.net code is running on the same framework inside the same clr. So performance really only matters when you start including things (dll's, com objects) that dont run on the .net framework otherwise vb.net and c# run with the same performance. It also helps to know that when vb.net and c# get compiled to the MSIL code, the MSIL code is virtually identical, there's extremely subtle differences between the two once compiled.
    Does c++ with VS run against the .net framework? As there's so many things you can do with c++ but not do with C# or VB, I always thought vc++ and c++ were the same, visual studio was just another compiler. If not, how come those things can't be done in VB or C#, as it's built into the framework? Are visual c++ apps just as slow as any other .net app?

  7. #7
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: C# or VB.NET

    Quote Originally Posted by Dark Anima View Post
    Does c++ with VS run against the .net framework?
    C++/CLI contains managed extensions that requires the .NET framework. Visual Studio can create these types of projects aswell as unmanaged c++ applications.
    Quote Originally Posted by Dark Anima View Post
    As there's so many things you can do with c++ but not do with C# or VB, I always thought vc++ and c++ were the same, visual studio was just another compiler. If not, how come those things can't be done in VB or C#, as it's built into the framework? Are visual c++ apps just as slow as any other .net app?
    What things that cant be done in VB or C# are you refering to?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  8. #8
    Addicted Member Dark Anima's Avatar
    Join Date
    Sep 2008
    Posts
    183

    Re: C# or VB.NET

    As a brief example, injecting into a process and opening a form inside it. I'm speaking of the pretty advanced stuff, which simply isn't built into VB at least.

  9. #9
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: C# or VB.NET

    Quote Originally Posted by Dark Anima View Post
    Does c++ with VS run against the .net framework? As there's so many things you can do with c++ but not do with C# or VB, I always thought vc++ and c++ were the same, visual studio was just another compiler. If not, how come those things can't be done in VB or C#, as it's built into the framework? Are visual c++ apps just as slow as any other .net app?
    c++ and vc++ as far as I know are similar, vc++ uses the Visual Studio compiler is my understanding.

    c++.net is the only .Net implementation that I know of that runs on the .Net Framework

    Here's how I think of it:
    If there's no ".Net" in the name, other than c# and f#, odds are it doesn't run on the Framework.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  10. #10
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: C# or VB.NET

    Quote Originally Posted by Dark Anima View Post
    As a brief example, injecting into a process and opening a form inside it. I'm speaking of the pretty advanced stuff, which simply isn't built into VB at least.
    Managed code can't be injected into unmanaged threads.
    (I suppose you could inject unmanaged code into managed threads, but I've not seen it done in practice.)


    Similarly, code that relies heavily on runtime library calls (like VB6 code) can't be injected into processes that don't have those libraries loaded.

  11. #11
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: C# or VB.NET

    And .Net applications are not slow either. I've seen examples compared on the internet and they tend to be skewed. .NET was conceived for LOB, enterprise and other such applications in was never intended to say build games (Which is why the XNA framework was built).

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