I have an object whose value may be one of several array types like int[] or string[], and I want to convert it to a string[]
object
int[]
string[]
The solution below is in JAVA
public static Objects[] convertObjectToObjectArray(){ Objects firstObject = new Object(); return new Object[]{firstObject}; }
In the above return statement, you are converting an object to an object array.