System.Runtime.InteropServices.OptionalAttribute Class

Indicates that a parameter is optional.

See Also: OptionalAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Parameter, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class OptionalAttribute : Attribute

Remarks

You can apply this attribute to parameters.

Optional parameters are not supported by all languages.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0