单例模式 MonoState
public class Boss { private static string name; public string Name { get => name; set => name = value; } public override string ToString() { return $"Boss is {name}"; } } class Program { static void Main(string[] args) { Boss boss1 = new Boss(); boss1.Name = "张三"; Boss boss2 = new(); Console.WriteLine(boss2); } }