Do you use VB or C#?

Ricky White
Ricky White used Ask the Experts™
I was curious to know how you guys remember the VB.Net or C# code syntax? or do you guys use some chart or MSDN help to look up the syntax while coding?

Do you stick with a single language like VB or C# as your main language? If so, doesn't it limit the number of jobs you can apply to?
I mean if you only know VB you can only apply to VB jobs not to C# jobs.

Please advise

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Glanced up at my screen and thought I had coded the Matrix...  Turns out, I just fell asleep on the keyboard.
Most Valuable Expert 2011
Top Expert 2015
I search the internet whenever I forget which class I am looking for. MSDN will be your primary source for Framework details (it will show up at the top of most searches). Intellisense will give you access to any classes which are in scope, but there are going to be times when you are not referencing the correct library, and you may need to search for which exact library you should be referencing. The more you code, however, the less you will end up doing this.

The language you code in will be dictated by a couple things:  the language enforced by your environment or your personal preference. For the former, if you are employed as a programmer by someone else, they will most likely already have an environment set up which uses one language over the other. Event though either language can reference libraries written in any .NET language, I believe it would be exceedingly rare for you to join an organization which actually uses both languages. If you are but a single developer (hobbyist or freelance), then you might choose to use one language over the other. If you are familiar with C/C++ or Java, then jumping into C# may be a more natural transition for you; if you come from a VB6 or VBA background, then VB.NET would be easier to start with.

The biggest thing I would suggest is get to know the Framework (not all of it, but a good foundation). If you understand how the Framework works, then you already know what classes are available to you. Learning a 2nd .NET language becomes a matter of learning the new syntax and perhaps a handful of language-specific quirks.
Paul JacksonSoftware Engineer
Top Expert 2011
I use both in my job as a result of having to maintain applications written in both languages and don't really find it a problem switching between the two. Tools like Visual Studio make it a lot easier to switch between the languages and it also means I'm not limited in my job choices.

There are some online resources as well that allow you to compare and contrast the differences if you need a refresher.
AshokSr. Software Engineer

I use (and prefer) C# as my main language.

But I can code in VB.NET as VB.NET is easier than C#.
If you know VB.NET only, company may not trust you will do good in C#.
If you know C# only, company will probably hire you for VB.NET job (in my opinion).

Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.


Thanks KaufMed - Can you please clarify what you mean by get familiar with the .Net Framework? What specifically would you suggest I should get familiar with? CLR, JIT, Namespace, classes or syntax?

Thanks Jack072 and Ashok!
kaufmedGlanced up at my screen and thought I had coded the Matrix...  Turns out, I just fell asleep on the keyboard.
Most Valuable Expert 2011
Top Expert 2015

Certainly gain an understanding of what the CLR and JIT are and what they do, but you don't need to know low-level details about them in order to be effective. When I say "get to know the Framework" I am referring to learning the different classes of the Framework and the namespaces they fall under. You don't have to know (and probably can't know) all of the classes found within the Framework, but you should know the native types (e.g. int, string, boolean, etc.) as well as the differences between classes and structs. Know how each kind of type behaves with respect to the runtime (e.g. value types are passed by value; references types are passed by reference).

Write a lot of "throw-away" projects. These are the projects which will most likely give you the experience with the Framework. Try something new in these throw-away projects. I didn't have one lick of Linq experience until I just sat down one day and forced myself through some tutorials. Now, I'm extremely pleased that I know Linq because I find it very useful.

As I alluded, the Framework itself is just a bunch of classes. These classes exist for all languages which target the .NET CLR. If you can grow to understand the classes, then you will be capable in either language. Sure if you are a C# programmer starting out in VB.NET for the first time ever, getting accustomed to:

If somethingIsTrue Then
End If

Open in new window

when you've only ever known:

if (somethingIsTrue)

Open in new window

...may take some time to adjust to. I started out as a VB.NET programmer. I self-taught myself C#. I can't tell you how many times I forgot to put braces into my if statements. However, because I had already worked in a .NET language (VB), the only thing I had to focus on was reminding myself to put braces into my code. I didn't have to spend much time hunting down classes to read XML files--I had already done so in VB.


Thank you!

If you or anyone would like expand on a related question, I have opened one more question at

If possible please reply.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial