public static bool canRead(this HanaDataReader reader, string tag, out int ordinal) { ordinal = -1; bool can = true; try { ordinal = reader.GetOrdinal(tag); } catch (IndexOutOfRangeException) { throw; } if (ordinal < 0) { can = false; } if (ordinal > 0) { if (reader.IsDBNull(ordinal)) { can = false; } } return(can); }