OptionalAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Define a field or property as optional.
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)]
[System.Serializable]
public class OptionalAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)>]
[<System.Serializable>]
type OptionalAttribute = class
inherit Attribute
Public Class OptionalAttribute
Inherits Attribute
- Inheritance
-
OptionalAttribute
- Attributes
Remarks
An optional field is one where having no value is an acceptable response. By default every field is considered required and must be filled in to complete the form.
Constructors
OptionalAttribute() |
Mark a field or property as optional. |