locked
Question about C# and VB usage RRS feed

  • Question

  • When I look at tutorials, it appears that the advanced tutorials are solely done in C#. Is there a reason why VB is not used concerning advanced tutorials? Is C# being pushed as a primary MSRS language?
    Friday, June 29, 2007 9:32 PM

Answers

  •  

    Not intentionally, however, C# has a couple of advantages that at least the current version of VB.Net does not have, namely anonymous delegates and iterators. Both are extremely useful when writing CCR code and while not absolutely required makes the code more concise and less verbose.

     

    As to language support in general, we absolutely do cover a broad set including not ony "classic" CLR languages like C# and VB.Net but also Python, C++ etc. For example, we have been adding better support for C++ which has advantages when interoperating with native libraries. The languages are not the same though and some features are simply easier to express in C# than in most other languages. That coupled with resource constraints are the primary reasons for the tutorials gravitating towards C#. However, if you have particular patterns or concepts that you would like to see in VB.Net then let us know and we will take it into consideration.

     

    Henrik

    Saturday, June 30, 2007 3:55 PM

All replies

  •  

    Not intentionally, however, C# has a couple of advantages that at least the current version of VB.Net does not have, namely anonymous delegates and iterators. Both are extremely useful when writing CCR code and while not absolutely required makes the code more concise and less verbose.

     

    As to language support in general, we absolutely do cover a broad set including not ony "classic" CLR languages like C# and VB.Net but also Python, C++ etc. For example, we have been adding better support for C++ which has advantages when interoperating with native libraries. The languages are not the same though and some features are simply easier to express in C# than in most other languages. That coupled with resource constraints are the primary reasons for the tutorials gravitating towards C#. However, if you have particular patterns or concepts that you would like to see in VB.Net then let us know and we will take it into consideration.

     

    Henrik

    Saturday, June 30, 2007 3:55 PM
  • You state how the "current" version of VB.Net does not support anonymous delegates and iterators. Does this mean that the upcoming VB version/release "will" include these features?

    What type of "resource contraints" are you referring to specifically?

    I have enjoyed VB.Net programming, but based on your input, am migrating to C#. I have much VB legacy code containing a wealth of algorithms and am considering using VB to C# converters. Do you recommend any specific type of VB to C# code converter? Do you believe these converters to be reliable?

    Saturday, June 30, 2007 7:20 PM
  • I'm getting start with c# too, 'cause I'm a VB.NET coder, and I think c# is the right language for .NET

    As for robotics studio, also in MicroFramework samples .. all c# code .. all c# samples ... so I think it's better to study c#

    For the old VB code, I suggest you to keep using with VS, and make the soluzion with c# and VB both , why not?
    I cannot unfortunatly 'cause I use the express editions ...

    Friday, July 6, 2007 1:20 PM
  • You will be happy with C#. I decided to learn C# when I first heard that Microsoft decided to use it internally for major developments. You will find it much more readable and even easier than VB when you get used to the language structure. Another benefit is that at this time the user base and samples available for C# are much greater than for VB, so to find a solution for your common coding problems it is easier to find a sample code in C# than any other .net language.

     

    You are still able to reuse your VB code in C#, if you don't want to convert the code you just need to compile your VB modules to .net assemblies and then reference them from your C# project. This also works with the VS express editions.

     

    Have fun

     

    Friday, July 6, 2007 8:50 PM
  • I think study C# is stupid way if you are professional VB.NET you can do everything like C# (unmanaged code and pointers in vb.NET available as well)
    there is no different between VB.NET and C# only difference between Vb.NET/C# and C++

    Regards
    Saturday, January 5, 2008 1:45 PM
  • I found this article about using iterators in VB.NET but apparently that is converted by a tool from a C# version and the code actually does not work. For some reason this feature was not added to VB.NET 2.0 and due to the syntax of the API used in MSRS, iterators are needed for creating service handlers that do sequential work. That is why Robotics Tutorial 3 does not have a VB sample.

    Tuesday, January 22, 2008 1:37 AM