using System;
namespace Person
{
class Person
{
string name, id, job;
int age;
double wage;
private Person(string name,int age,string id,string job,double wage)
{
this.name = name;
this.age = age;
this.id = id;
this.job= job;
this.wage = wage;
}
private void DisplayPerson()
{
Console.WriteLine("姓名:{0}\n年龄:{1}\n身份证号:{2}\n工作:{3}\n工资:{4} ", name, age, id, job, wage);
}
static void Main(string[] args)
{
Person p = new Person("小明", 20, "10023028", "会计",3000);
p.DisplayPerson();
Console.ReadLine();
}
}
}
我能说我认识你吗?哈哈
public class Person
{
public DateTime Person(string Name ,string CardNo){
return DateTime.Parse(Birthday.ToString("yyyy-MM-dd"));
}
public int ID { get; set; }
public string Name { get; set; }
public int Age{ get; set; }
public string CardNo{ get; set; }
public string Work{ get; set; }
public double Salary{ get; set; }
public DateTime Birthday{ get; set; }
}