static void Main() { LetterCollection cc = new LetterCollection(); foreach (string color in cc.Forward()) { Console.Write("{0} ", color); } Console.WriteLine(""); }
static void Main() { LetterCollection cc = new LetterCollection(); IEnumerable <string> ieable = cc.Forward(); IEnumerator <string> ieator = ieable.GetEnumerator(); while (ieator.MoveNext()) { Console.Write("{0} ", ieator.Current); } }
private void CreateUpperNavigationPanel() { // create the upper navigation panel foreach (var letter in "ABCDEFGHIJKLMNOPQRSTUVWXYZ") { LetterCollection.Add(new IndexViewModel { Text = letter.ToString(), IsActive = false }); } LetterCollection.Add(new IndexViewModel { Text = "Other", IsActive = false }); LetterCollection[0].IsActive = true; }
private void ActivateUpperPanel(bool active) { LetterCollection.First(l => l.Text == IndexLetter).IsActive = active; }