# RtfUserProperty

Custom document property from the RTF \userprops destination.

Class 

`OfficeIMO.Rtf`

**Namespace**

`OfficeIMO.Rtf`

**Assembly**

`OfficeIMO.Rtf`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[RtfUserProperty.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L23)

**Implements**

`IRtfCloneable`

**Modifiers**

sealed

Custom document property from the RTF \userprops destination.

## Inheritance

- object
- RtfUserProperty

## Usage

Explore 9 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 7

- Method [RtfDocument.AddUserProperty](/api/rtf/officeimo-rtf-rtfdocument/#method-adduserproperty-string-nullable-system-int32-string)
- Property [RtfDocument.UserProperties](/api/rtf/officeimo-rtf-rtfdocument/#property-userproperties)
- Method [RtfUserProperty.Boolean](/api/rtf/officeimo-rtf-rtfuserproperty/#method-boolean-string-boolean)
- Method [RtfUserProperty.DateTime](/api/rtf/officeimo-rtf-rtfuserproperty/#method-datetime-string-datetime)
- Method [RtfUserProperty.Integer](/api/rtf/officeimo-rtf-rtfuserproperty/#method-integer-string-int32)
- Method [RtfUserProperty.Number](/api/rtf/officeimo-rtf-rtfuserproperty/#method-number-string-double)
- Method [RtfUserProperty.Text](/api/rtf/officeimo-rtf-rtfuserproperty/#method-text-string-string)

### Accepted by parameters 2

- Method [RtfDocument.AddUserProperty](/api/rtf/officeimo-rtf-rtfdocument/#method-adduserproperty-officeimo-rtf-rtfuserproperty) parameter `property`
- Method [RtfLosslessEditor.SetUserProperty](/api/rtf/officeimo-rtf-rtflosslesseditor/#method-setuserproperty-officeimo-rtf-rtfuserproperty) parameter `property`

Filter members 

Show inherited

## Constructors

`public RtfUserProperty(string name, int? typeCode = null, string? staticValue = null)` [#](#constructor-ctor-string-nullable-system-int32-string)

[RtfUserProperty.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L23)

Creates a custom property.

Parameters

**name string required**

**typeCode int? = null optional**

**staticValue string? = null optional**

## Methods

`public static RtfUserProperty Boolean(string name, bool value)` [#](#method-boolean-string-boolean)

[RtfUserProperty.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L52)

Creates a boolean custom property.

Parameters

**name string required**

**value bool required**

Returns

`RtfUserProperty`

`public static RtfUserProperty DateTime(string name, DateTime value)` [#](#method-datetime-string-datetime)

[RtfUserProperty.cs:55](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L55)

Creates a date/time custom property.

Parameters

**name string required**

**value System.DateTime required**

Returns

`RtfUserProperty`

`public static RtfUserProperty Integer(string name, int value)` [#](#method-integer-string-int32)

[RtfUserProperty.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L46)

Creates an integer custom property.

Parameters

**name string required**

**value int required**

Returns

`RtfUserProperty`

`public static RtfUserProperty Number(string name, double value)` [#](#method-number-string-double)

[RtfUserProperty.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L49)

Creates a numeric custom property.

Parameters

**name string required**

**value double required**

Returns

`RtfUserProperty`

`public static RtfUserProperty Text(string name, string value)` [#](#method-text-string-string)

[RtfUserProperty.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L43)

Creates a text custom property.

Parameters

**name string required**

**value string required**

Returns

`RtfUserProperty`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Name { get; set; }` [#](#property-name)

[RtfUserProperty.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L31)

Property name from \propname.

`public int? TypeCode { get; set; }` [#](#property-typecode)

[RtfUserProperty.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L34)

RTF property type code from \proptype.

`public string? StaticValue { get; set; }` [#](#property-staticvalue)

[RtfUserProperty.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L37)

Static property value from \staticval.

`public string? LinkedValue { get; set; }` [#](#property-linkedvalue)

[RtfUserProperty.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L40)

Linked property value from \linkval.

## Fields

`public const int TextType` [#](#field-texttype)

[RtfUserProperty.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L8)

Text property type code used by common RTF producers.

Value: `30`

`public const int IntegerType` [#](#field-integertype)

[RtfUserProperty.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L11)

Integer property type code used by common RTF producers.

Value: `3`

`public const int NumberType` [#](#field-numbertype)

[RtfUserProperty.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L14)

Floating-point property type code used by common RTF producers.

Value: `5`

`public const int BooleanType` [#](#field-booleantype)

[RtfUserProperty.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L17)

Boolean property type code used by common RTF producers.

Value: `11`

`public const int DateTimeType` [#](#field-datetimetype)

[RtfUserProperty.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfUserProperty.cs#L20)

Date/time property type code used by common RTF producers.

Value: `64`

<!-- PowerForge markdown artifact sha256:B97D6F6E3A0F1213B58B6E848B828B58233EEBBEE6377A298FD15CD9B1B080D2 -->
