Extension method on SQLDataReader to check Null String

Niladri.Biswas
Posted by Niladri.Biswas under C# category on | Points: 40 | Views : 973
public static string CheckNullString(this SqlDataReader dr, int ordinal)
{
return dr.IsDBNull(ordinal) ? string.Empty : dr.GetString(ordinal);
}

Comments or Responses

Login to post response