YamlPropertyNameAttribute Class

Specifies the serialized YAML property name for a member.

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
public sealed class YamlPropertyNameAttribute : YamlAttribute
Inheritance
YamlAttribute YamlPropertyNameAttribute

Constructors

NameDescription
YamlPropertyNameAttribute(string)Initializes a new instance of the YamlPropertyNameAttribute class.

YamlPropertyNameAttribute(string)

YamlPropertyNameAttribute.cs

Initializes a new instance of the YamlPropertyNameAttribute class.

public YamlPropertyNameAttribute(string name)

Parameters

name string
The serialized member name.

Exceptions

ArgumentException
name is empty.
ArgumentNullException
name is null.

Properties

NameDescription
NameGets the serialized member name.

Gets the serialized member name.

public string Name { get; }

Property value

string