局部类 partial
using UnityEngine;
public class Test : MonoBehaviour {
void Start() {
People people = new People();
people.Eat();
people.Run();
}
}
public partial class People {
public void Eat() {
Debug.LogError("吃饭");
}
}
public partial class People {
public void Run() {
Debug.LogError("跑步");
}
}
局部类常用于做并行开发,逻辑拆分。
标签:partial,people,C#,局部,People,class,void,public From: https://www.cnblogs.com/wuzhongke/p/16608600.html