getter and setter for class in class c#

前端 未结 5 1844
攒了一身酷
攒了一身酷 2021-02-19 01:48

Assuming we have a class InnerClass with attributes and getter/setter. We also have a class OuterClass containing the InnerClass.

e.g.

class InnerClass
{         


        
5条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-19 02:20

    public InnerClass InnerClass
        {
            get
            {
                 return innerClass;
            }
            set
            {
                 innerClass = value;
            }
         }
    

提交回复
热议问题