I need to create an array of string arrays in C#. Basically, I want to do the following, kind of a hybrid C/C#:
private string[] revA = new string[] {"one", "two", "three" };
private string[] revB = new string[] {"four", "five", "six" };
private string[] revC = new string[] {"seven", "eight", "nine" };
string[,] list = {revA, revB, revC};
string outStr = list[0][0]; // outStr == "one"
string outStr = list[2][1]; // outStr == "eight"
But I know that won't work.
I've looked into ArrayList
and List
, but I'm not sure how to make it work.
Any help would be appreciated.