62
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
StringDataStore strStore = new StringDataStore();
8
9
strStore[0] = "One";
10
strStore[1] = "Two";
11
strStore[2] = "Three";
12
strStore[3] = "Four";
13
14
Console.WriteLine(strStore["one"]);
15
Console.WriteLine(strStore["two"]);
16
Console.WriteLine(strStore["Three"]);
17
Console.WriteLine(strStore["FOUR"]);
18
}
19
}
20
21
public class StringDataStore
22
{
23
24
private string[] strArr = new string[10]; // internal data storage
Cached Result