How to return a jagged array
-
30-10-2019 - |
문제
I have a function which use a 2D jagged array to save records from an SQL query.
How do return the jagged array correctly?
I tried something like:
public string[][] GetResult()
{
return result;
}
And in my main programm:
string[][] test = new string[server1.GetResult().Length][];
test = server1.GetResult();
Well, as expected, it didn't work.
I don't know how to fix my problem.
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow