John, was there a reason that you didn't use a generic method? Such as:
vb.net Code:
Public Function GetNullable(Of T As Structure)(ByVal source As Common.DbDataReader, _ ByVal name As String) As T? Dim ordinal As Integer = source.GetOrdinal(name) Return If(source.IsDBNull(ordinal), _ New T?(), _ DirectCast(source.GetValue(ordinal), T?)) End Function




Reply With Quote