EnumArgumentAttribute.

DefaultValue Property

Summary

The default value of the argument. This is set to the default value of the enum, which is the value set to 0.

Syntax

public Enum DefaultValue { get; }

Remarks

You can not set this to a specific value because of how attributes work. Enum is not a compile-time constant, so it can not be set when creating an attribute. The best we can do for a default value is the enum value set to 0. If Required is set to false, and if an enum does not have a value equal to 0, a validation error will happen.

Value

Type Description
Enum