Hello, There is the next task:
I need to check if input parameter (object) is array, then return array of input elements. For example I have input array like this:
int [] array = {1,2,3,4};
And method
private object[] GetArray(object @from)
{
}
So, I need to check in this method that input variable is array and after return this array.
For checking I use
if(@from.GetType().IsArray)
And how to create array from object ??? Is it possible ?
Thanks.