using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Person p1 = new Person();
p1.Name = "孙权";
p1.Age = 18;
p1.Gender ='男';
Console.WriteLine("他叫{0}。今年{1}岁,性别{2}",p1.Name,p1.Age,p1.Gender);
Console.ReadKey();
}
}
class Person
{
private string name;
private int age;
private char gender;
public string Name
{
set { name = value; }
get { return name; }
}
public int Age
{
set { age = value; }
get { return age; }
}
public char Gender
{
set { gender = value; }
get { return gender; }
}
}
}
07-05
127
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-13
333
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-15
1299
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-25
1815
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)