|
-
March 24th, 2011, 09:15 AM
#1
Lambda expressions
Hi there. This is a general C# question about lambda expressions. I've read the chapter in my book about it (Schildt's C# 4.0) and there is one use of it that I run into online that the book does not cover and that I do not understand.
Here are a couple of examples:
EnqueueCallback(() => Assert.AreNotEqual(viewModel.Products, null,
"Expected non-null products list."));
Delete = new DeleteCommand(
Service,
()=>CanDelete,
contact =>
{
CurrentContact = null;
Service.GetContacts(_PopulateContacts);
});
So the bit I don't understand is the notation with the empty brackets ( ()=> ). What is this all about? Can someone explain it please?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|