Check Null float for IDataRecord

Niladri.Biswas
Posted by Niladri.Biswas under C# category on | Points: 40 | Views : 1194
public static float CheckNullFloat(this IDataRecord reader, int ordinal)
{
if (reader == null) throw new ArgumentNullException("reader");
return reader.IsDBNull(ordinal) ? 0 : reader.GetFloat(ordinal);
}

Comments or Responses

Login to post response