Peter's Gekko

Sponsors

The Lounge

Wicked Cool Jobs

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
(Small) differences between C# and vb.net in code completion

Last weeks I've been doing some things in vb.net. Alas, you cannot mix languages within one assembly so I had no choice :> (No flames intended)

When it comes to codecompletion (I am a lazy typer) there a two notable differences in the behaviour of the VB.net editor versus the C# one. First of all VB takes a significant larger amount of time to build the list. What is harder to get used to is how to pick a member from the list. I was used to do this with the <enter> key in C#. This works in the VB editor but you get an extra line break for free. Using the <Tab> key gives the correct result in VB. And also works in the C# editor.

Peter


Posted Wed, Feb 18 2004 9:54 AM by pvanooijen

[Advertisement]

Comments

Daz wrote re: (Small) differences between C# and vb.net in code completion
on Wed, Feb 18 2004 6:07 AM
I usually use the SPACEBAR, in C# and VB. Additionnaly if the list isn't showing i also use the ctrl-spacebar to autocomplete a name.

Do you know why the C# team decided to check the code only at generation time and not as you type like in VB.NET?
Darrell wrote re: (Small) differences between C# and vb.net in code completion
on Wed, Feb 18 2004 6:42 AM
Because background compile is a feature that VB6 developers are used to, whereas the target market for C#, former C++ and Java developers, are used to having to compile first before doing any checks or getting any Intellisense.
Peter van Ooijen wrote re: (Small) differences between C# and vb.net in code completion
on Wed, Feb 18 2004 8:11 AM
Daz, the spacebar is for popping up the list. The difference is in picking one the items.
Darrel, C# does do a lot on the fly as well. Try this :
Type int anInt = 9; Go to a new line and type ctrl-space. The new var will be in the list....
Java developer wrote re: (Small) differences between C# and vb.net in code completion
on Wed, Nov 24 2004 11:13 PM
Well, I know of many Java IDEs which 'pre-compile' your source so you can catch syntax errors before you compile. It would be nice to have these functionalities. Visual Studio shouldn't just be for GUI developers. Things like automating property creation, extracting or generating Interfaces and Abstract classes from pre-existing code would be nice to have and save hours of monotonous coding that is error prone and not fun.
Peter van Ooijen wrote re: (Small) differences between C# and vb.net in code completion
on Thu, Nov 25 2004 1:29 AM
C# / VB.NET does pre-compile/parase while you are editing. It will help you catch syntax errors before building. And VS does have a lot of tools to generate/refactor code. Some, like refactoring, only for C# in VS 2005.
Don't get the GUI remark. Code completion (which is actually a Delphi term) or Intellisense as MS names it works in every .net source.
.NET Developer

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Devlicio.us