Why can't a member method be passed to a base class constructor?

后端 未结 7 1691
谎友^
谎友^ 2021-01-07 17:10
class Flarg
{
    private readonly Action speak;

    public Action Speak
    {
        get
        {
            return speak;
        }
    }

    public Flarg(Act         


        
相关标签:
7条回答
  • 2021-01-07 17:52

    Because on stage of the base class (Flarg) construction you have not an instance of the MuteFlarg class so can't access non static methods or fields.

    0 讨论(0)
提交回复
热议问题