I have the following base class:
public class Baseclass
{
public Baseclass(string anyparam)
{
}
}
I want to execute a lambda inside of the constructor of the child class:
public class Subclass : Baseclass
{
public Subclass() : base(delegate()
{
string returnstring;
// Do Something
return returnstring;
})
{
}
}
I don't want to waste any method on this, and I've not seen any example solving this without declaring the parameter type as func
. How do I do this in C#?