public class PriorityStatus : SmartEnum<PriorityStatus> { public static readonly PriorityStatus Backlog = new(nameof(Backlog), 0); public static readonly PriorityStatus Critical = new(nameof(Critical), 1); protected PriorityStatus(string name, int value) : base(name, value) { } }
客户端使用:
public ProjectStatus Status => _items.All(i => i.IsDone) ? ProjectStatus.Complete : ProjectStatus.InProgress;
标签:C#,PriorityStatus,智能,枚举,Critical,static,ProjectStatus,public From: https://www.cnblogs.com/friend/p/17473334.html