How do we use SqlDataReader obejct as an array?
<p>It might sound kiddish or silly but i wanna know that in codes like..</p>

<pre><code>SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
rdr.Read();
Response.Write(rdr[1]. ToString());
</code></pre>

<p>how do we use the <code>SqlDataReader</code> object as an array <code>(rdr[1])</code> without declaration?</p>

<p>What I want to know is, what is happening in the following line?</p>

<pre><code>Response.Write(rdr[1].ToString());
</code></pre>

<p>Since rdr is an object, how art we able to use square brackets with that?</p>
