Right now, I have nullable generic type and I can check if it is nullable or not. However, I cannot find a way to get a non-nullable type from it. Here is what I want to do:
If Nullable.GetUnderlyingType(nullableType) IsNot Nothing Then
Dim nonNullableType As Type = GetNonNullableType(nullableType)
End if
For example, if nullableType is Date?, I want "GetNonNullableType" function to return Date. If it is Integer?, the function will return Integer.