I am porting some c# code to vb.net, currently trying to figure out how to do this..
byte isEndReached = //get some data
if (isEndReached != 0)
{
for (int y = 0; y < isEndReached ; y++)
{
//do some stuff
}
}
My attempt:
Dim isEndReached As Byte = ''//getsomedata
If Not isEndReached Is Nothing Then
For y As Byte = 0 To isEndReached - 1
''//do some stuff
Next
End If
Problem is I am getting the following error:
'Is' operator does not accept operands of type 'Byte'. Operands must be reference or nullable types.
How am I supposed to fix this?
Thanks!