The company I work for uses vb.net since there are many programmers who moved up from vb6 to vb.net. Basically more vb.net resources in the company for support/maintenance vs c#. I am a c# coder and was wondering if I could just continue coding in c# and just use the many online free c# to vb.net code convertors. That way, I will be more productive and also be more marketable since there are more c# jobs compared to vb.net jobs. I have done vb6 many years ago and I am comfortable debugging vb.net code. It's just the primary coding language. I am more comfortable in c#. Will I lose anything if I use this approach. (code conversion). Based on what i read online the future of vb.net is really "Dim". Please advise. thank you
closed as primarily opinion-based by gnat, user40980, Simon Bergot, ChrisF♦ Jan 6 '14 at 21:04
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
I don't know about the converter's and if it's gonna make you lose anything(performance wise).
But I am sure about one thing, learning a new language would not hurt your resume.
It's always good in my opinion to learn something new and considering your case:
The company's major language is VB, you'll get along with the whole work environment far better.
It shows you can adapt to changes quite easily if you just pick the language and start working with it.
Despite both languages running on the .NET Framework, they have some differences that can make certain things easier or even possible in VB that aren't in C#, and vice versa.
Some things off the top of my head:
The VB version of the Application class has a SplashScreen property. When set to a Form in the main method, that Form will show when Application.Run() is called, until the main form is ready to show. In C# this isn't available, so to provide similar functionality you have to "roll your own" using the main form's Load handler; your VB colleagues will look at the translated code and say "why didn't you just use what the language gives you?"
Related: Event handlers (MulticastDelegates) in VB have built-in null checking; you can raise an event in VB without having to worry if anyone's actually listening. This isn't so in C#; you have to perform a null check first (and technically, as the listeners can change while the event is being handled, the best practice in threaded applications is to "clone" the collection of handlers and run that instead). When translated, the resulting code would be redundant.
Casting and conversion work differently in both languages. C# requires a defined implicit conversion between two types in order to convert. VB by contrast will "coerce" the type whenever it sees ANY valid cast between the actual type and the expected type, which can lead to unexpected behavior when VB coerces the type and thus picks a different overload or code branch than the same code in C#.
For more differences, see http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Visual_Basic_.NET#Language_features
So, I would recommend learning VB syntax and the language differences, and whether you use the converter on a daily basis or not, I would at least recognize situations where the purpose of the C# code you are writing would be more easily accomplished in straight VB, or where the C# code won't translate ("unsafe" blocks, "checked"/"unchecked" blocks, partial class declarations, etc).
Unless you run it by your manager first, the thing you are most likely to loose by doing that is your job....and if you do run it by your manager, the most likely outcome is you not being assigned to any VB.net projects.
Automated conversions give you a starting point, not a finished product.
If you were asked to code in Java then I could understand your concern...knowing that VB.Net is almost identical to C# but in the syntax, why not trying to learn those small differences and add to your skills and values?!