发布网友 发布时间:2024-10-23 17:01
共1个回答
热心网友 时间:6分钟前
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();
}
}
}
我能说我认识你吗?哈哈