I have a base class that has a bool property which looks like this:
public abstract class MyBaseClass
{
public bool InProgress { get; protected set; }
}
I am inheriting it another class from it and trying to add InProgress as a delegate to the dictionary. But it throws me an error. This is how my Derived class looks like:
public abstract class MyClass
{
Dictionary<string, object> dict = new Dictionary<string, object>();
dict.Add("InProgress", InProgress => base.InProgress = InProgress);
}
This is the error I am getting:
Cannot convert lambda expression to type 'object' because it is not a delegate type
What am I doing wrong here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…