It might sound kiddish or silly but i wanna know that in codes like..
SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
rdr.Read();
Response.Write(rdr[1]. ToString());
how do we use the SqlDataReader object as an array (rdr[1]) without declaration?
What I want to know is, what is happening in the following line?
Response.Write(rdr[1].ToString());
Since rdr is an object, how art we able to use square brackets with that?