3
I know in C# it is possible to do this:
public string propriedade { get; set; }
Is there any short way to declare properties with the procedures Get
and Set
in Visual Basic? The only way I know is this:
Private _propriedade As String
Public Property propriedade() As String
Get
Return _propriedade
End Get
Set(ByVal value As String)
_propriedade = value
End Set
End Property
I also know that writing Property
and squeezing Tab, Visual Studio makes it easy to autocomplete with the name chosen for the property.