陋室铭
永远也不要停下学习的脚步(大道至简至易)

如果是C#  6.0

public int X { get; set; } = 100

如果语法不支持,只能改回.net 2.0的写法。

public class UserType
    {
        private int _UserType = 1;
        public int UserTypeID 
        {
            get
            {
                return this._UserType;
            }
            set
            {
                this._UserType = value;
            }
        }
    }
posted on 2022-09-14 16:34  宏宇  阅读(265)  评论(0编辑  收藏  举报