title: Using the 'TestCase' attribute with a two-dimensional array
body: <p>I'm using NUnit and trying to implement tests for the following method:
  It should accept two integers and returns two dimensional array.
  So, header of my test looks like:</p>
  
  <pre><code>[TestCase(5, 1, new int[,]{{1}, {2}, {3}, {4}, {5}})]
  public void MyTestMethod(int a, int b, int[][] r)
  </code></pre>
  
  <p>During compilation I've got the following error:</p>
  
  <blockquote>
    <p>Error CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type (CS0182)</p>
  </blockquote>
  
  <hr>
  
  <p>I know it can be done using <code>TestCaseSource</code> to refer to object arrays like the answers to the following questions:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/19479817/how-do-i-put-new-listint-1-in-an-nunit-testcase">How do I put new List {1} in an NUNIT TestCase?</a></li>
  <li><a href="https://stackoverflow.com/questions/16171321/nunit-sequential-attribute-with-arrays-in-values">NUnit Sequential Attribute with arrays in Values</a></li>
  </ul>
  
  <p>which gives code like:</p>
  
  <pre><code>private object[][] combination_tests =  new [] {
      new object[] {5, 1, new [,]{{1}, {2}, {3}, {4}, {5}}},
  };
  
  [Test]
  [TestCaseSource("combination_tests")]
  public void MyTestMethod(int a, int b, int[,] r)
  </code></pre>
  
  <p>but I still have the question: is it possible to do that with using only the <code>TestCase</code> attribute?</p>