3 ms·
Wait, what? The => operator is just for lambdas, short-form returns and switch expression arms, which is as common as it gets! Have you never worked with any o
by neonsunset 1y ago
Wait, what? The => operator is just for lambdas, short-form returns and switch expression arms, which is as common as it gets!
Have you never worked with any other language which lets you do these?
var say = (string s) => Console.WriteLine(s);
or
struct Lease(DateTime expiration)
{
public bool HasExpired => expiration < DateTime.UtcNow;
}
or
var num = obj switch
{
"hello" => 42,
1337 => 41,
Lease { HasExpired: false } => 100,
_ => 0
};
You'll see forms of it in practically every (good) modern language. How on Earth is it confusing?
Authentication is generally a difficult subject, it is a weaker(-ish) aspect of (otherwise top of the line) ASP.NET Core. But it has exactly zero to do with C#.