public string GetPattern() { //local var int randomNumber = rnd.Next(Patterns.Count); return(Patterns.ElementAt(randomNumber)); }