Sushil Jadhav Sushil Jadhav -4 years ago 305
C# Question

Error "; expected" lambda expression c#

When I build the project (downloaded open source project) I am getting error ; expected at below line (at => symbol).

I am using VS2013 with .net framework 4.5 version. I google the issue but did not found anything.

public sealed class SqlError : baseclass
public override string Name => "sql"; //Error here

Name property in base class is defined as below

public virtual string Name { get; }

Answer Source

Just turn it into

public override string Name{
      return "sql;

I think its a VS2015 feature

public override string Name => "sql";` 

is the ' in the code aswell, then remove it ?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download