I have a method that generates an array. I want to return this array so I can use it another method. Here is my code so far:
public static Array[] generateFirstArray(int seedValue)
{
int[] firstArray = new int[20];
Random randomNumber = new Random(seedValue);
for (int i = 0; i < firstArray.Length; i++)
{
firstArray[i] = randomNumber.Next(0, 4);
}
return firstArray;
}
But when I run it, I get the following error:
Error 1 Cannot implicitly convert type 'int[]' to 'System.Array[]'
I tried to add [] after firstArray but still not working.