0

I have an enum like this :

[JsonConverter(typeof(StringEnumConverter))]
    public enum Process
    {
        [EnumMember(Value = "N/A")]
        None,
        [EnumMember(Value = "Something")]
        Something
     }
       

When I try to read its value like this:

Process.Status = JsonConvert.SerializeObject(Process.None);

I am getting 0 ALso toString() doesn't work as I get "None" and not "N/A". How do i solve this?

schwifty
  • 145
  • 1
  • 12

0 Answers0