Parsing and Handling for C# Enums and Usage of Partial classes #4330
Unanswered
nabeelvalley
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good day, when working with C# there are a couple of things I think may be useful due to the way C# works with enums and classes
int
orstring
, e.g. using something like the[JsonConverter(typeof(StringEnumConverter))]
attribute on top of an enum. According to this Stackoverflow answer you can useJsonConvert.SerializeObject(MyObject, new Newtonsoft.Json.Converters.StringEnumConverter());
but perhaps just adding that to the documentation for anyone looking to modify the enum parsingGenerally, none of these are issues and there are workarounds but I think it would be useful to be able to just (at least) add some more genericness to the C# generated code to make working with it a bit more easier
Beta Was this translation helpful? Give feedback.
All reactions