views:

1876

answers:

9

I have been a VB.net developer for a few years now but I am currently applying to a few companies that use C#. I have even been told that at least one of the companies doesn't want VB.net developers.

I have been looking online trying to find real differences between the two and have asked on crackoverflow. The only major differences are a few syntax difference which are trivial to me because I am also a Java developer.

What would be a good response to an interviewer when they tell me they are looking for a C# developer - or similar questions?

+2  A: 

I think the truth will-out on this:

I'm a software developer, the syntax of the language is the final part of the puzzle. By employing me, you're getting someone with demonstrable experience of problem solving and logic. I'm experienced with the .NET environment, the CLR and the associated Windows stack, including SQL and Windows server. I don't know the C# syntax, but, I am used to object-oriented approach, I will have no problem getting totally up to speed on the finer points of the syntax within a couple of weeks. You can see from these examples of my code that I'm an experienced developer, I assure you the transition will be seamless. I have already made a start learning the language, I haven't had any problems so far.

Andrew Taylor
+2  A: 

Some differences (that are more substantial than syntactical) that suitably catch me out sometimes:

  • VB.NET does not have anonymous delegates
  • Unsafe code blocks aren't in VB.NET
DAC
VB has anonymous delegates, that's just another term for anonymous functions.What VB doesn't have is anonymous subroutines. All anonymous delegates in VB must return a value.
Jonathan Allen
Only in VB v9+. This comment was in reference to VB v8.
DAC
+1  A: 

Truthfully? If you're a Java developer too, I'd lead with that. A Java developer with some experience in .NET will generally make a better impression than a VB developer with experience with Java. If you can answer questions on the difference between .NET and Java you should be in good shape.

I'd also recommend you learn the C# syntax ASAP. If you're experienced with VB and Java it won't take long.

A lot of developers have issues with VB and the people that use it. Valid or not you'll have to deal with that reality.

Reto Meier
+3  A: 

I love C# to death, but I envy VB.NET's optional parameters. Office automation in C# is so very, very painful.

Stu
C# 4.0 will bring optional parameters and dynamic typing for COM into the mix, which will make things much less painful.
Greg Beech
+2  A: 

@DAC - VB now (in .net3.5) has support for lambdas:

Function(x) x.ToString()

In an interview I'd say that understanding the CLR and what the code's really doing is what's important, and that you're happy to code in either (assuming that you are).

Keith
Yes and no. VB has anonymous functions, but not anonymous subroutines. Since event handlers are always subroutines, VB developers miss out here.
Jonathan Allen
A: 

There was this question which contains a few good references to VB/C# differences:

http://stackoverflow.com/questions/11632/what-are-the-most-important-functional-differences-between-c-and-vbnet

HTH

Kev
+7  A: 

I've had to interview people for a few C# positions and this is my general advice for VB.Net developers interviewing for a C# position:

  • Make sure you are clear that you have been working VB.Net. This seems obvious but is something that apparently isn't (in my experience).
  • Try to give a code sample, if possible. I've seen some horrible VB.Net (and C#) written by VB programmers who didn't seem to learn much in the transition to .Net.
  • Be able to write in C# during the interview, if asked. I know there aren't many real differences between the two, but I don't want to pay you to learn the new syntax.

For your specific question: I've asked that type of question before and what I wanted to hear about was how the underlying system and framework were the same. If possible, talk about garbage collection, IDisposable, finalizers, the dangers of unsafe code blocks, stack vs heap, etc. All the kind of stuff to show that you really understand the intricacies of the .Net framework. Right or wrong, the heritage of VB brings with it an expectation of a lack of understand of lower level programming and windows in general (which, ironically enough, a c++ developer would have of a c# developer... and so on).

Lastly, how you frame your experience can make a world of difference. If you position yourself as a .Net developer, rather than VB.Net or C#, the stupid, pseudo-religious, banter may not enter the conversation. This of course requires that you actually know both VB.Net and C# at the time of the interview, but that's a good policy regardless.

The truth of the matter is that if you find that the person interviewing you writes you off simply because you've previously been developing in VB.Net, it's likely not going to be a place you want to work at anyway.

akmad
A: 

VB or C# both are syntax only diffrent but if you are applying way of logic is same.

+2  A: 

I'm also a C# feller to the death but the differences are not just syntax. There are places where VB wins HANDS down

  1. Optional parameters
  2. Late binding

Working with COM from C# can be a very frustrating affair. (Which is not to say impossible!)

Conrad