Return multiple values in C#
<p>How can I return multiple values from a class in C# I tried in the below way but it didn't work for me.</p>

<pre><code>protected static string setvalues;
public static string myfunction()
{
        cmd = new SqlCommand("SELECT * FROM category", con);
        con.Open();
        SqlDataReader dr = cmd.ExecuteReader();
        while (dr.Read())
        {
            setvalues = dr[0].ToString();
        }
        con.Close();
        return setvalues.ToString();
}
</code></pre>

<p>I have the following in Categories table</p>

<pre><code>Mobiles
Laptops
Cloths
DVD players
Televisions
Cameras
</code></pre>

<p>Anybody please help me in building a code that can return thousands of values.</p>
