What is the difference, if I use () when declaring a property.
Public Property UserID() As String
Get
Return pUserID
End Get
Set(value As String)
pUserID = value
End Set
End Property
Public Property FullName As String
Get
Return pFullName
End Get
Set(value As String)
pFullName = value
End Set
End Property
ramll
Participant
1126 Points
1299 Posts
Difference in Property
Jan 24, 2013 06:02 PM|LINK
Hello,
What is the difference, if I use () when declaring a property.
Public Property UserID() As String Get Return pUserID End Get Set(value As String) pUserID = value End Set End Property Public Property FullName As String Get Return pFullName End Get Set(value As String) pFullName = value End Set End Propertyasp.netforum...
Member
604 Points
132 Posts
Re: Difference in Property
Jan 24, 2013 06:28 PM|LINK
please refer this
http://www.dotnetperls.com/property-vbnet
David Anton
Contributor
3702 Points
637 Posts
Re: Difference in Property
Jan 24, 2013 09:22 PM|LINK
There's no difference - VB allows either an empty parameter list on a property declaration or none - the effect is the same.
Also, VB allows calling a property with either no argument list or an empty argument list.
VB also allows 'parameterized properties' which have one or more parameters, in addition to indexers.
http://www.tangiblesoftwaresolutions.com
Instant C# - VB to C# Converter
Instant VB - C# to VB Converter