[ { Key: '24小时内未跟进', Value: 1 }, { Key: '24小时内跟进中', Value: 2 }, { Key: '超24小时即将掉库', Value: 3 }, { Key: '未跟进,申诉', Value: 4 }, { Key: '已跟进,待质检', Value: 5 }, { Key: '质检合规', Value: 6 }, { Key: '不合规,待申诉', Value: 7 }, { Key: '不合规,申诉中', Value: 8 }, { Key: '申诉,合规', Value: 9 }, { Key: '申诉,不合规 ', Value: 10 }, { Key: '不合规,掉库', Value: 11 }, ] 数组生成C#枚举带注释
时间: 2024-02-24 20:58:01 浏览: 62
json.zip_JSON_Json::Value_c++ Key Value_jsoncpp
好的,以下是将该数组生成C#枚举带注释的示例代码:
```
// 枚举定义
public enum FollowUpStatus
{
[Description("24小时内未跟进")]
NotFollowedUpWithin24Hours = 1,
[Description("24小时内跟进中")]
FollowingUpWithin24Hours = 2,
[Description("超24小时即将掉库")]
WillBeLostAfter24Hours = 3,
[Description("未跟进,申诉")]
NotFollowedUpAppealing = 4,
[Description("已跟进,待质检")]
FollowedUpPendingInspection = 5,
[Description("质检合规")]
InspectionCompliant = 6,
[Description("不合规,待申诉")]
NonCompliantAwaitingAppeal = 7,
[Description("不合规,申诉中")]
NonCompliantAppealing = 8,
[Description("申诉,合规")]
AppealCompliant = 9,
[Description("申诉,不合规")]
AppealNonCompliant = 10,
[Description("不合规,掉库")]
NonCompliantLost = 11
}
```
以上示例代码中,我们使用了C#的枚举类型来定义该状态数组,并使用了`[Description]`属性来为每个枚举值添加注释。这样做可以使代码更加清晰易读,并方便后续的维护。
阅读全文