An extension method for passing a column name to SqlDataReader.GetFieldValue in C#

I was reading some or another question on Stack Overflow today, and someone happened to reference the SqlDataReader.GetFieldValue method. It’s a generic method that returns the value of a column, given its 0-based ordinal value. using (var conn = new SqlConnection("yourConnectionString")) { using (var cmd = new SqlCommand("SELECT name, age FROM students", conn)) { conn.Open(); using (var dr = cmd.ExecuteReader()) { var name = dr.GetFieldValue<string>(0); var age = dr.GetFieldValue<int>(1); } } } This doesn’t seem very user-friendly to me. What happens if the query changes? If an additional column is added to the beginning, »