<>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace partial部分类
{
//这两个Person(部分类)构成了一个完成的类 为什么要有部分类:就在联合开发的过程中,每个人都有对这个Person类开发的权利。每个人都需要用。所有就需要有部分类
public partial class Person
{
public string Name { get; set; }
public int Age { get; set; }
}
public partial class Person
{
public char Gender { get; set; }
public string Address { get; set; }
}
class Program
{
static void Main(string[] args)
{
Person p = new Person();
p.Name = "张三";
p.Age = 25;
p.Gender = '男';
p.Address = "北京市朝阳区";
}
}
}