public static void Main()
{// do something here
String[] array1d = { "zero", "one", "two", "three" };
ShowArrayInfo(array1d);
PrintValues(array1d);
//do something here
}
public static void ShowArrayInfo(Array arr)
{//do something here}
public static void PrintValues( string[] myArr )
{//do something here}
In above code there are two different functions called
1. ShowArrayInfo
2. PrintValues
but the way array is collected in both the functions are different. In one, it is Array arr
and in another, it is int[] myArr
.
What is the difference between these two ways of collecting array , is arr
and myArr
are alike? Is arr
and myArr
reference to original array : array1d ? Can we perform same operations on myArr
as what we can perform on arr
?