DocumentProperty

DocumentProperty class

Represents a custom or built-in document property.

Properties

NameTypeDescription
NameStringReturns the name of the property.
ValueObjectGets or sets the value of the property.
IsLinkedToContentbooleanIndicates whether this property is linked to content
SourceStringThe linked content source.
TypeintGets the data type of the property. The value of the property is PropertyType integer constant.
IsGeneratedNamebooleanReturns true if this property does not have a name in the OLE2 storage and a unique name was generated only for the publ

Methods

NameDescription
toStringReturns the property value as a string.

Converts a number property using Object.ToString(). Converts a boolean property | | toInt | Returns the property value as integer.

Throws an exception if the property type is not PropertyType.Number. | | toDouble | Returns the property value as double.

Throws an exception if the property type is not PropertyType.Float. | | toDateTime | Returns the property value as DateTime in local timezone.

Throws an exception if the property type is not PropertyType. | | toBool | Returns the property value as bool.

Throws an exception if the property type is not PropertyType.Boolean. |

DocumentProperty.Name property

Returns the name of the property.

Type: String

DocumentProperty.Value property

Gets or sets the value of the property.

Type: Object

DocumentProperty.IsLinkedToContent property

Indicates whether this property is linked to content

Type: boolean

DocumentProperty.Source property

The linked content source.

Type: String

DocumentProperty.Type property

Gets the data type of the property. The value of the property is PropertyType integer constant.

Type: int

DocumentProperty.IsGeneratedName property

Returns true if this property does not have a name in the OLE2 storage and a unique name was generated only for the public API.

Type: boolean

toString()

Returns the property value as a string.

Converts a number property using Object.ToString(). Converts a boolean property into “Y” or “N”. Converts a date property into a short date string.

toInt()

Returns the property value as integer.

Throws an exception if the property type is not PropertyType.Number.

toDouble()

Returns the property value as double.

Throws an exception if the property type is not PropertyType.Float.

toDateTime()

Returns the property value as DateTime in local timezone.

Throws an exception if the property type is not PropertyType.Date.

toBool()

Returns the property value as bool.

Throws an exception if the property type is not PropertyType.Boolean.