public static void Main()
StringDataStore strStore = new StringDataStore();
Console.WriteLine(strStore["one"]);
Console.WriteLine(strStore["two"]);
Console.WriteLine(strStore["Three"]);
Console.WriteLine(strStore["FOUR"]);
public class StringDataStore
private string[] strArr = new string[10];
public string this[int index]
if (index < 0 && index >= strArr.Length)
throw new IndexOutOfRangeException("Cannot store more than 10 objects");
if (index < 0 && index >= strArr.Length)
throw new IndexOutOfRangeException("Cannot store more than 10 objects");
public string this[string name]
foreach (string str in strArr){
if(str.ToLower() == name.ToLower())