Methods | DocumentItem.TryGetFieldData Method
Attempts to get the field data from the document matching the type param. If the field data is not set, false is returned, and fieldData is set to default(T). If the field has data, and matches the type, true is returned, with fieldData set to the value.
Syntax
C#
Copy
public bool TryGetFieldData<T>( FieldItem field, out T fieldData )
Parameters
field FieldItem
The field to retrieve a value for.
fieldData T
The field value matching the type param.
Type Parameters
T
Only string, int, float, DateTime or bool should be specified here.
Return Value
Booleantrue if value retrieved matching type successfully; otherwise false.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | Thrown if field param is null. |