This is not really a question, since I can make it work. It's just something I have not seen before and I think it is odd. I'm writing some unit tests. One test works fine, but when I change a parameter for another test, it gives an error. The parameters do match what is passed into the methods. I just didn't retype the test method attribute each time here. This is not my actual code because that is the property of my employer and I am not allowed to post any of it. Hopefully there are no typos due to typing it out instead of copy/paste. This is C#.
Have any of you seen this before, and do you know why it would do this?
[TestMethod]
[DataRow(enumName.SomeValue, "stringValue", new string[] {"aryVal1","aryVal2"})] //this works, but when I remove the string value, it does not
[DataRow(enumName.SomeValue, new string[] {"aryVal1","aryVal2"})] //this gives error CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type
[DataRow( new string[] {"aryVal1","aryVal2"}, enumName.SomeValue)] //this works, but all I did was change the order of the parameters