D
D Witherspoon
I have a Structure I have created and am using it as a Public Property of a class. Here is the property.
------------------------------------------------------
Dim _MyID As SInteger
Public Property MyID() As SInteger
Get
Return _MyID
End Get
Set(ByVal Value As SInteger)
_MyID = Value
End Set
End Property
Here is the structure
--------------------------------------------------------
Public Structure SInteger
Private mi_Value As Integer
Private mb_IsNull As Boolean
Public Property Value() As Integer
Get
Return mi_Value
End Get
Set(ByVal Value As Integer)
mi_Value = Value
End Set
End Property
Public Property IsNull() As Boolean
Get
Return mb_IsNull
End Get
Set(ByVal Value As Boolean)
mb_IsNull = Value
End Set
End Property
End Structure
So....
In the class when i want to set the value of the Value or isNull property of the structure ...
MyID.Value = 5
I get an error: Expression is a value and therefore cannot be the target of an assignment.
But if I use
_MyID.Value=5 it works
What's the deal here???
------------------------------------------------------
Dim _MyID As SInteger
Public Property MyID() As SInteger
Get
Return _MyID
End Get
Set(ByVal Value As SInteger)
_MyID = Value
End Set
End Property
Here is the structure
--------------------------------------------------------
Public Structure SInteger
Private mi_Value As Integer
Private mb_IsNull As Boolean
Public Property Value() As Integer
Get
Return mi_Value
End Get
Set(ByVal Value As Integer)
mi_Value = Value
End Set
End Property
Public Property IsNull() As Boolean
Get
Return mb_IsNull
End Get
Set(ByVal Value As Boolean)
mb_IsNull = Value
End Set
End Property
End Structure
So....
In the class when i want to set the value of the Value or isNull property of the structure ...
MyID.Value = 5
I get an error: Expression is a value and therefore cannot be the target of an assignment.
But if I use
_MyID.Value=5 it works
What's the deal here???