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)
This work is licensed under a
Creative Commons Attribution 3.0 License.
Print This Post
Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment