Results 1 to 9 of 9

Thread: Moving over to C# from VB6

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    48

    Moving over to C# from VB6

    Hi Guys,

    Just after a little advice really.

    I have been coding in VB6 for a number of years now.. Whilst I wouldn't say I am great, I can build applications, databases etc..

    Our company has eventually decided to move forward and a couple of new guys employed work with C# and ASP to produce web based applications.

    I have no experience in creating web based apps, and am very keen to learn. They have suggested that I learn C# and pick up ASP.net as I go along.

    To be honest, I always thought that C# was used for creating web apps, but apparently it can also be used to create desktop apps, much like VB6.

    It seems that the way forward is to create web based applicaitons and I am just wondering which way to go. Training shouldn't be an issue... So, do I go for an OO course then onto C#, or do I stay with the VB theme and learn VB.Net.

    Any advice greatly welcome.

    Many thanks

    Mark

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Moving over to C# from VB6

    C# is Microsoft's premier programming language. The entire .NET Framework is written in C#. It is used for all sorts of applications, just like VB.NET. Once compiled the two produce essentially identical MSIL code, which is what gets compiled on-the-fly by the Framework when you run a .NET application.

    Unless you are considering changing jobs then you should learn whatever will be most useful to your employer, because VB.NET and C# will essentially do the same thing. All things being equal I'd lean slightly toward C#, but if VB would be more useful in your shop then that's the way to go.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2005
    Posts
    48

    Re: Moving over to C# from VB6

    Many thanks for your reply..

    AS my employer doesn't really know themselves, it is really down to me.

    The company that have taken us over have a couple of developers that use C#. I was just concerned that it was going to be a tough one to learn, you know what they say about old dogs and all that!!

    if VB.Net creates the same files and can be used to build web based apps then maybe I should concentrate on that. Surely the syntax is similar to VB6?

    But then again, C# is definately 'better' for me to have on my CV etc...

    Oh decisions, decisions....

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Moving over to C# from VB6

    The similarity between VB6 and VB.NET is a blessing and a curse. It's a blessing because it makes the language itself seem familiar, but it's a curse because the fact that the language seems familiar means that many developers expect it to work the same way. There is a school of thought that C# is easier to learn than VB.NET for VB6 developers because the fact that the syntax is different makes them more able to accept the fact that it works differently.

    Also, C# syntax is similar enough to VB.NET that anyone with experience with one can look at the other and, if they keep an open mind an not assume they can't understand it, take in at least 80%, if not more, of what's going on. Take C#, remove the braces and the semicolons and you're most of the way to VB.NET.

    As I said, all things being equal I'd lean towards C#. If your employer has no specific preference then C# is probably the way to go. Also, once you have C# experience you can basically put that OO and .NET experience together with the VB6 syntax and you've got VB.NET.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5
    Fanatic Member Jumpercables's Avatar
    Join Date
    Jul 2005
    Location
    Colorado
    Posts
    592

    Re: Moving over to C# from VB6

    I would lean towards C# as well, but it's important to learn OO Design even though VB.NET and C# are both OO languages, I prefer because I believe VB.NET promotes bad OO coding because of the use of modules.

    C# - .NET 1.1 / .NET 2.0

    "Take everything I say with a grain of salt, sometimes I'm right, sometimes I'm wrong but in the end we've both learned something."
    _____________________
    Regular Expressions Library
    Connection String
    API Functions
    Database FAQ & Tutorial

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Moving over to C# from VB6

    Quote Originally Posted by Jumpercables
    I would lean towards C# as well, but it's important to learn OO Design even though VB.NET and C# are both OO languages, I prefer because I believe VB.NET promotes bad OO coding because of the use of modules.
    So don't use modules. There is no requirement to, plus a static class in C# behaves the same way as a module in VB anyway.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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

    Re: Moving over to C# from VB6

    We had this discussion in the GD forum. No language 'promotes' anything, that part is up to you as the programmer.

    However, as you say, C# is definitely a smarter move for your career.

    Also, if you don't know any other languages with C-based syntax, it's a perfect place to start, because it's basically VB with a C-based syntax. This opens up other doors for you in the future, for languages such as PHP and of course C/C++ themselves.

  8. #8
    Fanatic Member Jumpercables's Avatar
    Join Date
    Jul 2005
    Location
    Colorado
    Posts
    592

    Re: Moving over to C# from VB6

    Quote Originally Posted by jmcilhinney
    So don't use modules. There is no requirement to, plus a static class in C# behaves the same way as a module in VB anyway.
    I understand there is no requirement to use modules but I hated to see modules in VB6 that use globals.

    C# - .NET 1.1 / .NET 2.0

    "Take everything I say with a grain of salt, sometimes I'm right, sometimes I'm wrong but in the end we've both learned something."
    _____________________
    Regular Expressions Library
    Connection String
    API Functions
    Database FAQ & Tutorial

  9. #9
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Moving over to C# from VB6

    Doesn't matter what you learn, once you learn either language well enough, you'll be able to pick up the other one pretty quickly.

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