How can I define my return type
<p>I have the following code:</p>

<pre><code>   public IList&lt;Content.Grid&gt; GetContentGrid(string pk)
    {
        // How can I define result to hold the return 
        // data? I tried the following but it does not
        // work:
        var result = new IList&lt;Content.Grid&gt;();

        var data = _contentRepository.GetPk(pk)
             .Select((t, index) =&gt; new Content.Grid()
             {
                 PartitionKey = t.PartitionKey
                 ....
             });

        switch (pk.Substring(2, 2))
        {
            case "00":
                return data
                    .OrderBy(item =&gt; item.Order)
                    .ToList();
                break;
            default:
                return data
                    .OrderBy(item =&gt; item.Order)
                    .ToList();
                break;

        }
    }
</code></pre>

<p>The VS2012 is telling me that the break is not needed so what I would like to do is to remove the returns from inside the switch, store the results in a variable and then after the switch is completed have:</p>

<pre><code>return result;
</code></pre>

<p>Can someone tell me how I can declare the variable called result. I tried the following but this gives a syntax error:</p>

<pre><code>var result = new IList&lt;Content.Grid&gt;();
</code></pre>
