Hello - I had an issue that I have now corrected, but I'd like to understand why the original way I had this behaved as it did.
Original way:
Code:
    Dim b As Byte?
    Dim s As String = " "     ' s will either contain a blank space or a digit between 0 and 3
    b = CType(if(s = " ", Nothing, s), Byte?)
When the above code executed, I expected the variable b to be null (Nothing), however, it contained zero (0).

The fix:
Code:
    Dim b As Byte?
    Dim s As String = " "     ' s will either contain a blank space or a digit between 0 and 3
    b = If(s = " ", Nothing, CType(s, Byte?))
When the above code executed, b was Nothing as one would expect.

The question is why did the first example return 0 rather than Nothing?