HumanReadableDefaultValueAttribute Class

Specifies the default value of a property or field used for comparison when serializing.

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
public sealed class HumanReadableDefaultValueAttribute : HumanReadableAttribute
Inheritance
HumanReadableAttribute HumanReadableDefaultValueAttribute

Constructors

NameDescription
HumanReadableDefaultValueAttribute(object?)Initializes a new instance of HumanReadableDefaultValueAttribute.

HumanReadableDefaultValueAttribute(object?)

HumanReadableDefaultValueAttribute.cs

Initializes a new instance of HumanReadableDefaultValueAttribute.

public HumanReadableDefaultValueAttribute(object? defaultValue)

Parameters

defaultValue object?

Properties

NameDescription
DefaultValueGets the default value used for comparison when determining whether to serialize a property or field based on the DefaultIgnoreCondition setting.

Gets the default value used for comparison when determining whether to serialize a property or field based on the DefaultIgnoreCondition setting.

public object? DefaultValue { get; }

Property value

object?