FormDataObject.mandatory Method
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.
Overloads
mandatory() |
Sets or returns a value that indicates whether the data field is mandatory. |
mandatory(Boolean) |
mandatory()
Sets or returns a value that indicates whether the data field is mandatory.
public:
virtual bool mandatory();
public virtual bool mandatory ();
abstract member mandatory : unit -> bool
override this.mandatory : unit -> bool
Public Overridable Function mandatory () As Boolean
Returns
true if the field is mandatory; otherwise, false.
Remarks
The following example shows how to retrieve and set the mandatory property for the field.
// Return the value of the mandatory property.
info (strfmt("mandatory: %1", fdo.mandatory()));
// Set the value of the mandatory property.
fdo.mandatory(false);
Applies to
mandatory(Boolean)
public:
virtual bool mandatory(bool _value);
public virtual bool mandatory (bool _value);
abstract member mandatory : bool -> bool
override this.mandatory : bool -> bool
Public Overridable Function mandatory (_value As Boolean) As Boolean
Parameters
- _value
- Boolean
The value to assign to the mandatory property of the field.