How to insert data in array of type string?
<p>I am  selecting data from database and in while loop, i want it store all data in one variable. How to do that? 
The variable selectAnswer is string array type .</p>

<p>I used this code but this give error. Modify this code.</p>

<pre><code>string selectAnswer[] = new string[];
while (rdr.Read())
{
    selectAnswer[] = rdr[0].ToString();
}  
</code></pre>
