The check on 0xFF fails in an if statement.
It looks as if it considered as integer, a check on -1 works.
The check on 0xFF works in a Case Select
Dim b As Byte = 0xFF
If b = 0xFF Then 'a test on -1 works
Msgbox("0xFF check OK","")
Else
Msgbox("???","")
End If
PS: The subject had to be "byte check via hex notation"
It looks as if it considered as integer, a check on -1 works.
The check on 0xFF works in a Case Select
Dim b As Byte = 0xFF
If b = 0xFF Then 'a test on -1 works
Msgbox("0xFF check OK","")
Else
Msgbox("???","")
End If
PS: The subject had to be "byte check via hex notation"