Correct use of Nullable types
Posted on 2006-06-13
I'm not sure if I'm overcomplicating something here, and using the concept of nullable types in the wrong way.
I have a class whos constructor looks something like:
Public sub New(varA as double, varB as double)
It's valid for either varA or varB to be null, and doing so would result in different behaviour in the underlying construction.
To allow the passing of nulls, I have declared this as:
Public sub New(varA as Nullable(of double), varB as Nullable(of double))
Is this the correct / intended use of Nullable, or am I committing sin here?