I've inherited a C# MVC web app at my work and there is an assignment directly inside of a controller class that looks like this:
public class FooController : Controller
{
private IAuthenticationManager AuthenticationManager => HttpContext.GetOwinContext().Authentication;
}
Visual Studio highlights it with an error, something like "; expected". But it compiles and runs just fine. If I change the "=>" to a simple assignment "=", it highlights HttpContext with an error "An object reference is required for the non-static field bla bla bla..." and it won't compile.
So here's my question. Why does using the "=>" operator compile and work properly? I'm new to C# (came from Android/iOS development) so while it's easy enough to understand some things, stuff like this perplexes me.