if you want to hadle only null
if(s != null))
{
sb.Append(s);
sb.Append("/t");
}
if you need to handle null and empty string
if(!string.IsNullOrEmpty(s))
{
sb.Append(s);
sb.Append("/t");
}
but if you need to check ISDBNULL.. use this generic method.. or customize it in to your solution
public static T GetDBValue<T>(SqlDataReader reader, string Column)
{
int _intColumnID = reader.GetOrdinal(Column);
if (reader.IsDBNull(_intColumnID))
return default(T);
else
return (T)reader.GetValue(_intColumnID);
}
hope this will help...