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 : YamlAttribute

Remarks

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
YamlAttribute YamlNumberHandlingAttribute

Constructors

NameDescription
YamlNumberHandlingAttribute(YamlNumberHandling)Initializes a new instance of the YamlNumberHandlingAttribute class.

YamlNumberHandlingAttribute(YamlNumberHandling)

YamlNumberHandlingAttribute.cs

Initializes a new instance of the YamlNumberHandlingAttribute class.

public YamlNumberHandlingAttribute(YamlNumberHandling handling)

Parameters

handling YamlNumberHandling
The number handling to apply.

Properties

NameDescription
HandlingGets the number handling to apply.

Gets the number handling to apply.

public YamlNumberHandling Handling { get; }

Property value

YamlNumberHandling