You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When an Enum Member has the following annotation, EnumMember(Value = ""). The returned value should be "", as opposed to the Enum Member Name.
To Reproduce
Console.WriteLine("Start");
var yamlValue = new YamlDotNet.Serialization.Serializer().Serialize(EnumMemberedEnum.EmptyValue);
//yamlValue == "EmptyValue" // Should be '' as opposed to EmptyValue
var yamlObject = (new YamlDotNet.Serialization.Deserializer().Deserialize<EnumMemberedEnum>(yamlValue));
Console.WriteLine("End");
public enum EnumMemberedEnum
{
No = 0,
[System.Runtime.Serialization.EnumMember(Value = "goodbye")]
Hello = 1,
[System.Runtime.Serialization.EnumMember(Value = "")]
EmptyValue = 2,
[System.Runtime.Serialization.EnumMember()]
NullValue = 3
}
The text was updated successfully, but these errors were encountered:
Describe the bug
When an Enum Member has the following annotation, EnumMember(Value = ""). The returned value should be "", as opposed to the Enum Member Name.
To Reproduce
The text was updated successfully, but these errors were encountered: