O
Osmosis
I have a simple class like this
Structure Eventitem
Public logdate As DateTime
Public recurring As Byte
Public Description As String
End Structure
I create several objects of this type and keep them in an arraylist named
'history'
When I try to assign a new value to one of the descriptions with the
following code :
CType(history(0), Eventitem).Description = "popo"
I get the following error message : Expression is a value and therefore
cannot be the target of an assignment.
I'm fairly new to VB.NET, but this seems like valid code to me. I found a
similar example at
http://samples.gotdotnet.com/quickstart/howto/doc/clone.aspx with the
following line : CType(nl(0), Employee).Name = "Mary Smith"
Does someone have a clue why I'm getting this error ?
Thanks in advance,
Osmosis
Structure Eventitem
Public logdate As DateTime
Public recurring As Byte
Public Description As String
End Structure
I create several objects of this type and keep them in an arraylist named
'history'
When I try to assign a new value to one of the descriptions with the
following code :
CType(history(0), Eventitem).Description = "popo"
I get the following error message : Expression is a value and therefore
cannot be the target of an assignment.
I'm fairly new to VB.NET, but this seems like valid code to me. I found a
similar example at
http://samples.gotdotnet.com/quickstart/howto/doc/clone.aspx with the
following line : CType(nl(0), Employee).Name = "Mary Smith"
Does someone have a clue why I'm getting this error ?
Thanks in advance,
Osmosis