Skip to content

Instantly share code, notes, and snippets.

@arkilis
Created December 26, 2020 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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