Skip to content

Instantly share code, notes, and snippets.

@jskeet
Created August 20, 2013 18:55
Show Gist options
  • Save jskeet/6285657 to your computer and use it in GitHub Desktop.
Save jskeet/6285657 to your computer and use it in GitHub Desktop.
using System;
using System.Linq;
using System.Windows.Forms;
class Test
{
public static void Main()
{
var combo = new ComboBox
{
Items = { "Foo", "Bar", "Baz" }
};
combo.SelectedIndexChanged += (sender, e) =>
Console.WriteLine("Index changed!");
Form form = new Form { Controls = { combo } };
Application.Run(form);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment