When using Nullable(Of T) you can access its value by either calling Nullable(Of T).Value property directly, or by just accessing the object directly eg:
Dim myValue As Nullable(Of Integer) = 10
Debug.WriteLine(myValue.Value)
Debug.WriteLine(myValue)
How would I replicate the second example in my own class?
You will need to write implicit conversion operators for your type and the type you wish to convert to/from.
This is done using the
WideningorNarrowingmodifiers.See the Type Conversions in Visual Basic topic on MSDN.