IsDefaultAttribute Method

Attribute.IsDefaultAttribute Method ()

 

When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

abstract IsDefaultAttribute : unit -> bool
override IsDefaultAttribute : unit -> bool

Return Value

Type: System.Boolean

true if this instance is the default attribute for the class; otherwise, false.

The default implementation of this class returns false, and must be implemented in the derived class to be useful to that class.

The implementation of this method in a derived class compares the value of this instance to a standard default value, then returns a Boolean value that indicates whether the value of this instance is equal to the standard value. The standard value is typically coded as a constant in the implementation, or stored programmatically in a field used by the implementation.

The following code example illustrates the use of IsDefaultAttribute.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft