I have this working code for my dictionary:
dict = new Dictionary<string, string>();
using (StreamReader read = new StreamReader("dictionaryfile.csv"))
{
string line;
while ((line = read.ReadLine()) != null)
{
string[] splitword = line.Split(',');
dict.Add(splitword[0], splitword[1]);
}
}
I've added a button to my Windows form, and how would I assign a random entry from my dictionary to show in a message box from the button click?