How to write methods in C# which take lambdas as parameters

Jordan Lee
The Startup
Published in
3 min readNov 23, 2019

--

If you’re new to C# or ASP.NET Core, you’ve probably used methods which take lambdas as a parameter, but might not be sure how to write such methods yourself.

For example, let’s take the Configure method from an ASP.NET Core application straight out of the box:

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{…

--

--