如何将string[][]
数组传递给 ValuesAttribute?
我有:
public string[][] Array1 = new[] {new[] {"test1", "test2"}};
//...
[Test, Sequential]
public void SomeTest(
[Values("val1", "val2", "val3")] string param1,
[Values(Array1, Array2, Array3)] string[][] param2) { //... }
我有Cannot access non-static field "Array1" in static context
。比我Array1
用static
关键字标记,比我得到An attribute argument must be a constant expression...
的比我用关键字标记它,readonly
我仍然有An attribute argument must be a constant expression...
这里有什么方法可以传递多个数组吗?(除了相关的丑陋string[][][]
和通过param2
索引)array[][]
array[][][]