I have a common method which accepts array of object as parameter.
Now, there are instances where I need to pass just a single object to function call. To save lines of code and memory, I try doing it inline as:
func(new ObjectType(param));
But this doesn't compile as it is expecting an array of object. How can I transform this object into an array inside my function call? (Does it require another constructor or operator overloading?)
new Object[] { object_i_want_in_array }? Or something like that? Or make an override of the function to take just one?