Is it possible to create an attribute that can be initialized with a variable number of arguments?
For example:
[MyCustomAttribute(new int[3,4,5])]
Yes, but you need to initialize the array that you are passing in. Here is an example from a row test in our unit tests that tests a variable number of command line options;
[Row( new[] { "-l", "/port:13102", "-lfsw" } )] public void MyTest( string[] args ) { //... }