An associative array is little bit different from regular array as in c and many language.
An array is a collection of similar data type which can be read by index
i.e. ar[8] here 8 is an index
In Associative array a key is used instead of index for getting array element. Key must be unique otherwise you can’t get all elements uniquely following code implement this logic
class IndexeCls
{
private string[] namelist = new string[size];
static public int size = 3;
public IndexeCls()
{
for (int i = 0; i < size; i++)
namelist[i] = "N. A.";
}