# RtfDocumentVariable

Document variable from the RTF \docvar destination.

Class 

`OfficeIMO.Rtf`

**Namespace**

`OfficeIMO.Rtf`

**Assembly**

`OfficeIMO.Rtf`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

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

**Implements**

`IRtfCloneable`

**Modifiers**

sealed

Document variable from the RTF \docvar destination.

## Inheritance

- object
- RtfDocumentVariable

## Usage

Explore 2 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 2

- Method [RtfDocument.AddDocumentVariable](/api/rtf/officeimo-rtf-rtfdocument/#method-adddocumentvariable-string-string)
- Property [RtfDocument.DocumentVariables](/api/rtf/officeimo-rtf-rtfdocument/#property-documentvariables)

Filter members 

Show inherited

## Constructors

`public RtfDocumentVariable(string name, string value)` [#](#constructor-ctor-string-string)

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

Creates a document variable.

Parameters

**name string required**

**value string required**

## 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)

[RtfDocumentVariable.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocumentVariable.cs#L15)

Document variable name.

`public string Value { get; set; }` [#](#property-value)

[RtfDocumentVariable.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfDocumentVariable.cs#L18)

Document variable value.

<!-- PowerForge markdown artifact sha256:6390A2B52311BBE7A78197EB463C63F84DDDDB30E3FF935B753A192B1B3706FB -->
