예제 #1
0
 public T Value <T>(int ordinal, T defaultValue)
 {
     if (Reader.IsDBNull(ordinal))
     {
         return(defaultValue);
     }
     try
     {
         return(Reader.GetFieldValue <T>(ordinal));
     }
     catch (FormatException)
     {
         return(defaultValue);
     }
 }