求大神帮忙解答!!!!

 

    public class Person
    {
        private int age;
        private string name;
        private string sex;
        public int Age
        {
            get { return age; }
            set { age = value; }
        }
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        public string Sex
        {
            get { return sex; }
            set { sex = value; }
        }
        public virtual void ShowInfo()
        {
            string output = "姓名:" + name + ",性别:" + sex + ",年龄" + age.ToString();
            //调用打印机的类,请自行实现
            //参考这个文章 https://www.cnblogs.com/wendj/p/10728685.html
            //Printer.Print(output);
        }
    }

看你的贴图,这不是python的,推测是c#的,给你个c#代码

https://www.cnblogs.com/wendj/p/10728685.html