YamlNumberHandlingAttribute Class
Specifies how numbers are handled when serializing or deserializing the annotated member or type.
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
public sealed class YamlNumberHandlingAttribute : YamlAttributeRemarks
This is the YAML equivalent of JsonNumberHandlingAttribute. When applied to a type, it sets the default handling for all numeric members declared on that type. When applied to a member, it overrides the type-level and serializer-level handling for that member.
- Inheritance
YamlAttributeYamlNumberHandlingAttribute
Constructors
| Name | Description |
|---|---|
| YamlNumberHandlingAttribute(YamlNumberHandling) | Initializes a new instance of the YamlNumberHandlingAttribute class. |
YamlNumberHandlingAttribute(YamlNumberHandling)
YamlNumberHandlingAttribute.csInitializes a new instance of the YamlNumberHandlingAttribute class.
public YamlNumberHandlingAttribute(YamlNumberHandling handling)Parameters
handlingYamlNumberHandling- The number handling to apply.
Properties
| Name | Description |
|---|---|
| Handling | Gets the number handling to apply. |