Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 - C# editor more cumbersome than VB.NET editor

I traditionally work in VB.NET, but have been asked to code the latest project in C#.

This is fine as I can work in either language, having had to frequently translate C# code to VB in the past and I've no qualms about developing in either.

My issue is with the Visual Studio editor and how many of the tasks that have traditionally been automated for me while writing VB.NET code are missing when writing C# code, or involve a larger variety of key-presses.

For example, creating a new #region or function...

In VB.NET creating a region involves typing #+r, at which point intellisense kicks in and shows me #Region. I press space and #Region is auto-completed, thus allowing me to type the region name, then click Enter and the closing #End Region is automagically added.

In C#, I type #+r... and nada.. I have to either click Ctrl + k + x and select #Region from the list of snippets to achieve the same effect.

Similarly when writing functions in VB.NET ... the autocomplete creates the structure in seconds, whereas C# involves having to manually add the brackets etc, adding precious seconds to the development process. (or perhaps there is another shortcut key combo)

These are just two examples, but there are many others where the short-cuts that the VB.NET editor provides make coding much faster than the C# editor. I'm pretty shocked actually as C# is so often lauded for being "better" than VB.NET.

Anyway rant over.

My question is, are there any plugins which allow autocomplete on the C# editor in the same way as provided to the VB.NET editor?

like image 532
Peter Avatar asked Oct 06 '11 17:10

Peter


2 Answers

Resharper.........................................................................

like image 64
Matthew Abbott Avatar answered Oct 12 '22 01:10

Matthew Abbott


I think you're just used to coding in VB.NET. As for your comment about C# being viewed as superior to VB.NET, I think you need to make a distinction between the language and the editor, because the two are not intrinsically tied together.

It's possible that C# doesn't offer the same auto-completion features that VB.NET does, but I think productivity comes down to how comfortable you are with the language. Even without those auto-completion features, I can code a heck of a lot faster in C# than I can in VB.NET, and that's because I'm used to how C# behaves, and I know how to flow with the editor.

In my honest opinion, I think you need to get used to coding in C# before you can make a true assessment of how coding in either language impacts your productivity.

EDIT

If you're looking for something free that's comparable to Resharper, I would suggest taking a look at CodeRush Xpress. There's also a full-featured version of CodeRush that retails around $100 cheaper than Resharper.

like image 32
James Johnson Avatar answered Oct 12 '22 01:10

James Johnson