Click or drag to resize

DocumentItemTryGetFieldDataT 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.

Namespace: Compiled.EDD.Scripting
Assembly: Compiled.EDD.Scripting (in Compiled.EDD.Scripting.dll) Version: 9.0.0.0-142fa9725
Syntax
C#
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

Boolean
true if value retrieved matching type successfully; otherwise false.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown if field param is null.
See Also