Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VB.NET equivalent of C# property shorthand?

People also ask

Is Visual Basic like C#?

Though C# and VB.NET are syntactically very different, that is where the differences mostly end. Microsoft developed both of these languages to be part of the same . NET Framework development platform. They are both developed, managed, and supported by the same language development team at Microsoft.

What is operator C#?

Operators are symbols that are used to perform operations on operands. Operands may be variables and/or constants. For example, in 2+3 , + is an operator that is used to carry out addition operation, while 2 and 3 are operands. Operators are used to manipulate variables and values in a program.

What is equivalent to C#?

It is enharmonically equivalent to D-flat major. Its key signature has seven sharps.


There is no shorthand for Visual Studio 2008 or prior for VB.NET.

In Visual Studio 2010 and beyond, you can use the following shorthand:

public property FirstName as String

This will be handled as your short version in C# is - I think they call it "Auto Property"

See also: Auto-Implemented Properties (Visual Basic)


In Visual Studio 2008, after typing just the keyword Property, press the Tab key. It'll paste a template snippet for you which you can fill very quickly.

But yeah, there is not a replacement of a Visual Basic 10-type shortcut in Visual Basic 9.


Unfortunately, Visual Basic 9 (which ships with .NET 3.5/Visual Studio 2008) does not have automatic properties.