Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Func<string> q = () => {
Thread.Sleep(2000);
return "Hard-obtained string";
};
Console.WriteLine(q());
Console.WriteLine(q());
Console.WriteLine(q());
q = q.Caching();
Console.WriteLine(q());
Console.WriteLine(q());
Console.WriteLine(q());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment