8

As I read http://msdn.microsoft.com/en-us/library/ms165394.aspx:

For VB:

Inside the Snippet element, add the References element and all of the required child elements that add a reference to the project when the snippet is inserted.

For C#

Visual C# code snippets to do not support the References section, so a reference to System.Windows.Forms.dll must be added to the project manually

What fundamental reason prevents C# to support References like VB ?

Update: I saw this posted http://visualstudiogallery.msdn.microsoft.com/en-us/dc06b54c-b6c4-4cf5-8203-a09c6979e881

But it isn't even as full-featured as Code Snippet References as Code Snippet References will allow you to add multiple references at once not just one by one.

C# is supposedly more "professional" than VB.NET, one would expect C# to be more featured not more limited or does "professional" means you have to do it the hard way as said "MANUALLY" :p

When will the C# team catch up with VB.NET team ?

user310291
  • 36,946
  • 82
  • 271
  • 487
  • 4
    Ooh, interesting. If this worked I could have all my favourite references just as snippets ;) – Marc Gravell Dec 17 '10 at 18:25
  • 5
    Because the VB team included this feature and the others didn't, probably – Iain Ward Dec 17 '10 at 18:26
  • 2
    @Marc: You might be interested in http://visualstudiogallery.msdn.microsoft.com/en-us/dc06b54c-b6c4-4cf5-8203-a09c6979e881 and http://visualstudiogallery.msdn.microsoft.com/en-us/e8123d4c-e4dd-4d11-8fc0-fbe6c6382e8f. – Nicole Calinoiu Dec 17 '10 at 18:31
  • @Nicole Interesting but poorer than VB.NET code snippet add references. – user310291 Dec 17 '10 at 18:57

3 Answers3

13

Karen Liu of the C# IDE team responded to this in a feedback report:

Thanks for submitting this suggestion. This is something we are aware of and had tried to do as a Design Change Request before. Ultimately, based on cost to implement this where we were in the product cycle, we made the tough decision that since references would be something you would need to add only once, this did not make it into VS2005. This is something we are looking to do in the future though and hearing feedback on this is valuable.

Only nine upvotes, not enough to make it a popular request. I'd recommend you vote it up, they do pay attention to that.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • Interesting but this report concerns add reference NOT code snippet per because for code snippet why on earth can't they use the same code implementation for C# and VB.NET since it is almost the same thing ? – user310291 Dec 17 '10 at 18:48
  • 1
    The VB.NET and C# IDEs only look the same. Very distinct chunks of code under the hood. And separate teams to support and develop it. Small teams is a survival strategy for a company like Microsoft, big ones don't work. – Hans Passant Dec 17 '10 at 18:52
  • C# is supposedly more "professional" than VB.NET, one would expect C# to be more featured not more limited or does "professional" means you have to do it the hard way as said "MANUALLY" :p – user310291 Dec 17 '10 at 19:03
  • 3
    That's an incredibly loaded term, professional programmers have no trouble writing solid code in VB.NET. But Visual Basic has had a very strong IDE for well over 20 years now. It does stand to reason that it gets a bit more attention within the team and that it took the C# team a while to catch up to this much history. – Hans Passant Dec 17 '10 at 19:08
  • 1
    Good answer that's it for me the C# team has to catch up with the VB.NET team. – user310291 Dec 17 '10 at 20:35
11

The fundamental reason is that VB thought the scenario had more value for their customers than C# did and hence invested in the feature. There is nothing preventing C# from adding the feature. It simply didn't meet the cut list when they evaluated it against other IDE fetaures.

JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454
1

politician reasons, IMHO C# is more "hardcore", while vb is more "let's do it quick and contract a codemonkey to do it.

So, a VB programmer usually will stick with a standard (vanilla install) visual studio installation, while a c# programmer will install one (or more) plugins (Resharper,Coderush,etc.) , not counting extra components (Telerik, Devexpress..), instead a c# will not work unless visual studio have at least one extra code assistance plugins.

magallanes
  • 6,583
  • 4
  • 54
  • 55
  • Plugins had nothing to do with the decision. – JaredPar Dec 17 '10 at 18:32
  • Why not?. In fact, there are more plugins supporting c# than vb.net and almost every plugins is tenfold times better than the visual studio alternative. – magallanes Dec 17 '10 at 18:39
  • @malleganes, teh amount of plugins just didn't factor in. It's the VB team sitting in a room looking at a feature list and saying "this will be valuable to customers given the cost and doesn't force us to not implement a feature we think is more valuable". The C# sat in a room and didn't think the same thing. – JaredPar Dec 17 '10 at 19:16
  • it would not be politically correct for MS to answer that plugins have anything to do ;) – user310291 Dec 17 '10 at 20:37