I have the following code as part of my project. There is other code in there that can be commented out for the purposes of this exchange.
namespace Project.HttpHandlers
{
public class Web : IHttpHandler
{
/// <summary>
/// Gets a value indicating whether another request can use the
/// <see cref="T:System.Web.IHttpHandler"/> instance.
/// </summary>
/// <returns>
/// true if the <see cref="T:System.Web.IHttpHandler"/> instance
/// is reusable; otherwise, false.
/// </returns>
public bool IsReusable => false;
}
}
Visual Studio throws an error on the "public bool IsReusable => false;" line stating that "; expected".
When highlighting the intellisense error over the => operator I get "unexpected end of declaration".
If I change it to "public bool IsReusable = false;" the error goes away. I don't entirely know the function of this line and why there is a lambda operator there so I do not want to do that. I do know it is compilable on a coworkers machine and I see it referenced elsewhere on the web.
I seem to be missing a reference or something else in Visual Studio but I cannot find it.