Explicit cast exists but doesn't seem to work for Dictionary<int, string[]> to IDictionary<int, IEnumerable<string>>
<p>Writing code with implicit cast generates <a href="http://msdn.microsoft.com/en-us/library/5z8wb9e4.aspx" rel="nofollow">CS0266</a>.</p>

<pre><code>Dictionary&lt;Int32, string[]&gt; d1 = new Dictionary&lt;int, string[]&gt;();
IDictionary&lt;int, IEnumerable&lt;string&gt;&gt; ide1 = d1; // CS0266
</code></pre>

<p>The hint that an explicit cast exists suggests an explicit cast would fix the issue.</p>

<pre><code>IDictionary&lt;int, IEnumerable&lt;string&gt;&gt; ide1 = (IDictionary&lt;int, IEnumerable&lt;string&gt;&gt;)d1; // No error, but throws an exception
</code></pre>

<p>Is there a way to make this cast ? Would it work for <code>string[][]</code> and <code>IEnumerable&lt;IEnumerable&lt;string&gt;&gt;</code> ?</p>

<pre><code>namespace Quickie
{
    class QuickieArray
    {
        private static void TestCastDictionaryWithArrayValue()
        {
            Console.WriteLine();
            Console.WriteLine("===TestCastDictionaryWithArrayValue===");
            Dictionary&lt;Int32, string[]&gt; d1 = new Dictionary&lt;int, string[]&gt;();
            d1[1] = new string[]{"foo"};
            IDictionary&lt;int, string[]&gt; id1 = d1;
            Console.WriteLine("id1 is null: {0}", id1 == null);
            IDictionary&lt;int, IEnumerable&lt;string&gt;&gt; ide1 = id1 as IDictionary&lt;int, IEnumerable&lt;string&gt;&gt;;
            IDictionary&lt;int, IEnumerator&lt;string&gt;&gt; iden1 = id1 as IDictionary&lt;int, IEnumerator&lt;string&gt;&gt;;
            Console.WriteLine("ide1 is null: {0}", ide1 == null);
            Console.WriteLine("iden1 is null: {0}", iden1 == null);

            Console.WriteLine();
        }
        internal static void Test()
        {
            Console.WriteLine();
            Console.WriteLine("=QuickieArray=");
            TestCastDictionaryWithArrayValue();
        }
    }
}
</code></pre>

<p>Output:</p>

<blockquote>
  <p>===TestCastDictionaryWithArrayValue===<br>
  id1 is null: False<br>
  ide1 is null: True<br>
  iden1 is null: True  </p>
</blockquote>
