一、运行效果截图
二、实验要求
三、代码示例
//author---Henan University.software engineering.李思佳
using System;
namespace ConsoleApp3
{
public enum Gender
{
男,
女
}
public class Citizen
{
public string ID { set; get; }
public string Name { set; get; }
public Gender G { set; get; }
public int Age;
public string Birthplace { set; get; }
public string Familyaddress { set; get; }
public int AGE //属性
{
get
{
return Age;
}
set
{
if (value <= 0 || value > 150)
Console.Wri