C# vs VB.NET
-
Hi All, I'm currently working with Visual Studio 6.0 VB and C++, now I want to migrate to .NET platform, witch language should I choose ? Any ideas, thanks
Carlos Mariano
-
Hi All, I'm currently working with Visual Studio 6.0 VB and C++, now I want to migrate to .NET platform, witch language should I choose ? Any ideas, thanks
Carlos Mariano
Use C++/CLI and/or VB.NET 2005 =)
ROFLOLMFAO
-
Hi All, I'm currently working with Visual Studio 6.0 VB and C++, now I want to migrate to .NET platform, witch language should I choose ? Any ideas, thanks
Carlos Mariano
-
Hi All, I'm currently working with Visual Studio 6.0 VB and C++, now I want to migrate to .NET platform, witch language should I choose ? Any ideas, thanks
Carlos Mariano
You want to keep as much as possible what you already have and know ? Stick to your familiar language, inside .NET You want to move forward ? Go for C#. It may look a bit strange and complex at first (events, delegates, generics,...), but you soon will appreciate its expressive power. :)
Luc Pattyn
-
Hi All, I'm currently working with Visual Studio 6.0 VB and C++, now I want to migrate to .NET platform, witch language should I choose ? Any ideas, thanks
Carlos Mariano
If you're either more comfortable with C++ than VB or equally comfortable, then go for C#.
Kevin
-
Hi All, I'm currently working with Visual Studio 6.0 VB and C++, now I want to migrate to .NET platform, witch language should I choose ? Any ideas, thanks
Carlos Mariano
C# goes more deeply than VB.NET ?? I really don't get the picture about what are the big diferences between both languages. Thanks for the answers.
Carlos Mariano
-
C# goes more deeply than VB.NET ?? I really don't get the picture about what are the big diferences between both languages. Thanks for the answers.
Carlos Mariano
First some similarites: :: They both use the .NET framework. That means that there is very little difference in what you can do with the languages. :: They both compile to IL code, using a JIT compiler to produce the final executable. Well written code in each language results in very similar IL code, so they perform about the same. :: They both are fully object oriented (as opposed to VB 6, which is not). Then some differences: :: C# is a relatively new language, based on the better parts of Java, C++ and Pascal (Delphi), while VB.NET suffers a bit from being based on VB 6, and also suffers from being based on BASIC, a language that is over 40 years old... :: C# uses strict data typing, while VB.NET uses implicit conversions. You have to specify most data type conversions in C#, while VB.NET will automatically perform conversions in the background. The automatic conversions makes some things easier, but it's quite easy to use expensive conversion by mistake if you don't know what you are doing. :: The syntax of VB.NET is very similar to VB 6, which makes it compelling for old VB 6 programmers. The syntax of C# is similar to C++, which makes it compelling for C++ programmers. It's a good idea to get some knowledge in both C# and VB.NET, as that makes it a lot easier if you find example code that you need to convert. It also gives a deeper knowledge in how .NET works.
--- Year happy = new Year(2007);
-
First some similarites: :: They both use the .NET framework. That means that there is very little difference in what you can do with the languages. :: They both compile to IL code, using a JIT compiler to produce the final executable. Well written code in each language results in very similar IL code, so they perform about the same. :: They both are fully object oriented (as opposed to VB 6, which is not). Then some differences: :: C# is a relatively new language, based on the better parts of Java, C++ and Pascal (Delphi), while VB.NET suffers a bit from being based on VB 6, and also suffers from being based on BASIC, a language that is over 40 years old... :: C# uses strict data typing, while VB.NET uses implicit conversions. You have to specify most data type conversions in C#, while VB.NET will automatically perform conversions in the background. The automatic conversions makes some things easier, but it's quite easy to use expensive conversion by mistake if you don't know what you are doing. :: The syntax of VB.NET is very similar to VB 6, which makes it compelling for old VB 6 programmers. The syntax of C# is similar to C++, which makes it compelling for C++ programmers. It's a good idea to get some knowledge in both C# and VB.NET, as that makes it a lot easier if you find example code that you need to convert. It also gives a deeper knowledge in how .NET works.
--- Year happy = new Year(2007);
Guffa wrote:
:: C# uses strict data typing, while VB.NET uses implicit conversions. You have to specify most data type conversions in C#, while VB.NET will automatically perform conversions in the background. The automatic conversions makes some things easier, but it's quite easy to use expensive conversion by mistake if you don't know what you are doing.
You can override this behaviour in VB.NET by setting
OPTION STRICT
on it.the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before. -
Guffa wrote:
:: C# uses strict data typing, while VB.NET uses implicit conversions. You have to specify most data type conversions in C#, while VB.NET will automatically perform conversions in the background. The automatic conversions makes some things easier, but it's quite easy to use expensive conversion by mistake if you don't know what you are doing.
You can override this behaviour in VB.NET by setting
OPTION STRICT
on it.the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.Now I have more ideas about both languages. Ok, thank you all for the replies.
Carlos Mariano