DocumentProperty
DocumentProperty class
Represents a custom or built-in document property.
Properties
| Name | Type | Description |
|---|---|---|
| Name | String | Returns the name of the property. |
| Value | Object | Gets or sets the value of the property. |
| IsLinkedToContent | boolean | Indicates whether this property is linked to content |
| Source | String | The linked content source. |
| Type | int | Gets the data type of the property. The value of the property is PropertyType integer constant. |
| IsGeneratedName | boolean | Returns true if this property does not have a name in the OLE2 storage and a unique name was generated only for the publ |
Methods
| Name | Description |
|---|---|
| toString | Returns 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.