A
Andrus
I need to pass 9-element string array to method
I tried code below bot got a lot of compile errors.
How to fix ?
Andrus.
class Test
{
static void Main()
{
string stringarray[9];
stringarray[0] = "test";
PassArray( stringarray );
}
static void PassArray ( string p[9] ) {
// must output test
Console.WriteLine( p[0] );
}
}
I tried code below bot got a lot of compile errors.
How to fix ?
Andrus.
class Test
{
static void Main()
{
string stringarray[9];
stringarray[0] = "test";
PassArray( stringarray );
}
static void PassArray ( string p[9] ) {
// must output test
Console.WriteLine( p[0] );
}
}