M
Mike G.
I have a dumb question: What does the defaultvalue attribute do?
The help system says that it "Specifies the default value for a property",
and provides the following as an example:
Private MyVar as Boolean = False
<DefaultValue(False)> _
Public Property MyProperty() As Boolean
Get
Return MyVar
End Get
Set
MyVar = Value
End Set
End Property
It seems to me that MyProperty has a default value of false because of the
first line:
Private MyVar as Boolean = False
So, what exactly does DevaultValue(False) do?
Thanks!
Mike
The help system says that it "Specifies the default value for a property",
and provides the following as an example:
Private MyVar as Boolean = False
<DefaultValue(False)> _
Public Property MyProperty() As Boolean
Get
Return MyVar
End Get
Set
MyVar = Value
End Set
End Property
It seems to me that MyProperty has a default value of false because of the
first line:
Private MyVar as Boolean = False
So, what exactly does DevaultValue(False) do?
Thanks!
Mike