If I have a method declared like this:
private void someFunction(object[] param1)
When I call this function do I have to declare the object array as a variable, or is there a quicker / shortcut way to just pass it inline to the function call.
I’m doing it like this:
Object[] myParam1 = new Object[2]
myParam1[0] = "blah";
myParam1[1] = "blah blah";
someFunction(myParam1);
In my real code, not this example, I’m calling COM from Marshal, and the code is getting messy each time I have to declare the arguments.
someFunction(new [] { "blah", "blah blah", "more", "etc" });