c# 对象封装时get、set 简单的对属性值的处理
案例说明:赋值人这个对象的属性-出生日期,根据属性出生日期内部自动计算出年龄封装的对象using System;namespace Demo.Model{ /// <summary> /// 对象人 /// </summary> public class Person { private static int age; private static DateTime birthDate;
原创
2020-09-17 13:27:39 ·
1226 阅读 ·
0 评论