G
Guest
Hi all,
I have a method that wants to return an array. What datatype should I use ?
I tried using an "Array" but there was a compilation error. Why ?
public Array setReviewAll2 (int intNumQn)
int rows = intNumQn;
int cols = 3;
string [,] arrRv = new string [rows,cols];
for ( int i = arrRv.GetLowerBound(0); i <= arrRv.GetUpperBound(0); i++ ){
for ( int j = arrRv.GetLowerBound(1); j <= arrRv.GetUpperBound(1); j++ )
{
...
...
...
}
}
arrRv.SetValue( strAnswer, i, j );
return arrRv;
}
TIA.
regards,
Andrew
I have a method that wants to return an array. What datatype should I use ?
I tried using an "Array" but there was a compilation error. Why ?
public Array setReviewAll2 (int intNumQn)
int rows = intNumQn;
int cols = 3;
string [,] arrRv = new string [rows,cols];
for ( int i = arrRv.GetLowerBound(0); i <= arrRv.GetUpperBound(0); i++ ){
for ( int j = arrRv.GetLowerBound(1); j <= arrRv.GetUpperBound(1); j++ )
{
...
...
...
}
}
arrRv.SetValue( strAnswer, i, j );
return arrRv;
}
TIA.
regards,
Andrew