I'm trying to read one textfile (one line per entry, separated by two "enums" used as attribute, see example).
[enum1_0][enum2_0]
line
line
[enum1_0][enum2_1]
line
line
[enum1_1][enum2_0]
line
line
[enum1_1][enum2_1]
line
line
I want to create a string[][][]
that stores all these strings, so that I later can easily retrieve them using a method like this, but I'm having alot of trouble with the syntax and how to identify the sign attributes in the textfile:
public static string GetRandomString(Enum1 e1, Enum2 e2)
{
return _strings[(int)e1][(int)e2][_random.Next(0, length)];
}
To clarify: I have a textfile that has one entry per line, where blocks of lines are separated by "[]"-marked 'signs' that correspond to every index of MyEnum1 and MyEnum2.
I'm trying to read all strings into a single string[], and then sort them into a string[][][] using System.File.IO.ReadAllLines, so that I can later use my function shown above to retrieve them using my enums.