I need my array to store a bool and string pair.
MyType[,] array1 = { {true, "apple"}, {false, "orange"} };
// Later in my code.
for (i = 0; i < array1.Length; i++)
{
if(array1[i, 0] == true)
{
Console.WriteLine(array1[i, 1]);
}
}
How do I get the above in C#
without using collection?
If not possible, which collection should I use?