Skip to content

Instantly share code, notes, and snippets.

@farukcan
Created February 19, 2023 17:46
Show Gist options
  • Save farukcan/3631cc0024953b1d4c1e6a5448f36562 to your computer and use it in GitHub Desktop.
Save farukcan/3631cc0024953b1d4c1e6a5448f36562 to your computer and use it in GitHub Desktop.
C# Action, Func and Task
Action : Gets parameters. (x) => {} . Action , Action<int>
Func : Gets parameters and returns value. (x) => y or (a,b) => { return y; } . Func<int,int> . (last generic is return value type)
Task : Gets parameters, works async, may return value. async (x) => {...await y()...} , or async (x) => await y(x). async Task<int>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment