how to use dictionary as a list c# code example
Example 1: list dictionary c#
List<Dictionary<string, string>> MyList = new List<Dictionary<string, string>>();
Example 2: array list dictionary c#
int[] myIntArray = new int[10];
myIntArray[0] = 0;
myIntArray[1] = 10;
myIntArray[2] = 20;
myIntArray[3] = 30;
// Assignment via loop
for (int i=0; i<myIntArray.Length; i++)
{
myIntArray[i] = i * 10;
}
// Foreach loop over array
foreach (int element in myIntArray)
{
Console.WriteLine("${element}");
}