Serialize C# Enum Definition to Json

后端 未结 2 1223
误落风尘
误落风尘 2021-02-18 14:43

Given the following in C#:

[Flags]
public enum MyFlags {
  None = 0,
  First = 1 << 0,
  Second = 1 << 1,
  Third = 1 << 2,
  Fourth = 1 <&l         


        
2条回答
  •  庸人自扰
    2021-02-18 15:15

    You're better off populating a Dictionary or a Typed DTO and serializing that.

提交回复
热议问题