I have a constructor that has a similar signature to ExampleObject(string name, params object[]).
My usual procedure of passing items to this constructor is:
var thisObject = new ExampleObject("name", obj1, obj2, obj3);
Is there anyway I can initialize a separate array of objects, and pass that array to the constructor IN Addition to how I normally do it, by means of LINQ or some other magic?
Ideal result:
object[] specialObjects = {new object("specObj1"), new object("specObject2")}
var thisObject = new ExampleObject("name", obj1, obj2, specialObjects...
Would I need to use LINQ's Enumerable, ForEach, or something I'm completely unaware of, or is something like this not feasible and I should include obj1 and obj2 into specialObjects?
ExampleObject, which may or may not be the case.