S
shapper
Hello,
I have a generic list as follows:
Dim rows As New Generic.List(Of row)
Now I have a row:
Dim myRow As row
I tried to check, further in my code, if the row is nothing:
If myRow Is Nothing Then
....
End If
I get an error:
"Is" requires operand that have reference types but this operand has
the value of Rows.Row"
Any idea what I am doing wrong?
Anyway, this is my row definition and its dependencies:
' Row
Public Structure Row
' -- [Properties] ----
' Cells
Private _Cells As Generic.List(Of Cell)
Public Property Cells() As Generic.List(Of Cell)
Get
Return _Cells
End Get
Set(ByVal Cells As Generic.List(Of Cell))
_Cells = Cells
End Set
End Property ' Cells
' Name
Private _Name As String
Public Property Name() As String
Get
Return _Name
End Get
Set(ByVal Name As String)
_Name = Name
End Set
End Property ' Name
End Structure ' Row
' Cell
Public Structure Cell
' -- [Properties] ----
' Content
Private _Content As Object
Public Property Content() As Object
Get
Return _Content
End Get
Set(ByVal Content As Object)
_Content = Content
End Set
End Property ' Content
' Culture
Private _Culture As CultureInfo
Public Property Culture() As CultureInfo
Get
Return _Culture
End Get
Set(ByVal Culture As CultureInfo)
_Culture = Culture
End Set
End Property ' Culture
End Structure ' Cell
Thanks,
Miguel
I have a generic list as follows:
Dim rows As New Generic.List(Of row)
Now I have a row:
Dim myRow As row
I tried to check, further in my code, if the row is nothing:
If myRow Is Nothing Then
....
End If
I get an error:
"Is" requires operand that have reference types but this operand has
the value of Rows.Row"
Any idea what I am doing wrong?
Anyway, this is my row definition and its dependencies:
' Row
Public Structure Row
' -- [Properties] ----
' Cells
Private _Cells As Generic.List(Of Cell)
Public Property Cells() As Generic.List(Of Cell)
Get
Return _Cells
End Get
Set(ByVal Cells As Generic.List(Of Cell))
_Cells = Cells
End Set
End Property ' Cells
' Name
Private _Name As String
Public Property Name() As String
Get
Return _Name
End Get
Set(ByVal Name As String)
_Name = Name
End Set
End Property ' Name
End Structure ' Row
' Cell
Public Structure Cell
' -- [Properties] ----
' Content
Private _Content As Object
Public Property Content() As Object
Get
Return _Content
End Get
Set(ByVal Content As Object)
_Content = Content
End Set
End Property ' Content
' Culture
Private _Culture As CultureInfo
Public Property Culture() As CultureInfo
Get
Return _Culture
End Get
Set(ByVal Culture As CultureInfo)
_Culture = Culture
End Set
End Property ' Culture
End Structure ' Cell
Thanks,
Miguel