Finally C# gets to be usable!

The best thing to happen since the inceptions of C#: “anonymous methods” are .NET delegates cum closures. Finally we can write syntax like:



addButton.Click += new EventHandler(object sender, EventArgs e) {



list.Add(new ListItem());


}


Even better: Anonymous methods will be closures, so you can use variables from the scope. This is a much needed amendment. Why was it not there from the start? (whine, whine)

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.

Print This Post Print This Post

blog comments powered by Disqus
Creative Commons Attribution 3.0 Unported
Creative Commons Attribution 3.0 Unported