Skip to content

Instantly share code, notes, and snippets.

@arkilis
Created December 26, 2020 21:18
Show Gist options
  • Save arkilis/73254cab9c33dc11272257d1a1ef6f85 to your computer and use it in GitHub Desktop.
Save arkilis/73254cab9c33dc11272257d1a1ef6f85 to your computer and use it in GitHub Desktop.
// action with generic type
Action<Book> printBookTitle = delegate(Book book)
{
Console.WriteLine(book.Title);
};
printBookTitle(book);
// action without generic type
Action printLog = delegate {
Console.WriteLine("log");
};
printLog();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment