# RtfToken

Represents one lexical token from an RTF stream.

Class 

`OfficeIMO.Rtf.Syntax`

**Namespace**

`OfficeIMO.Rtf.Syntax`

**Assembly**

`OfficeIMO.Rtf`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[RtfToken.cs:64](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Syntax/RtfToken.cs#L64)

**Modifiers**

sealed

Represents one lexical token from an RTF stream.

## Inheritance

- object
- RtfToken

## Usage

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

- Property [RtfTokenizeResult.Tokens](/api/rtf/officeimo-rtf-syntax-rtftokenizeresult/#property-tokens)

Filter members 

Show inherited

## Methods

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

[RtfToken.cs:64](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Syntax/RtfToken.cs#L64)

Returns a string that represents the current object.

Returns

`string` A string that represents the current object.

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

## Properties

`public RtfTokenKind Kind { get; }` [#](#property-kind)

[RtfToken.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Syntax/RtfToken.cs#L33)

Token kind.

`public int Position { get; }` [#](#property-position)

[RtfToken.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Syntax/RtfToken.cs#L36)

Zero-based input position.

`public string RawText { get; }` [#](#property-rawtext)

[RtfToken.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Syntax/RtfToken.cs#L39)

Raw source text that produced the token.

`public string? Text { get; }` [#](#property-text)

[RtfToken.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Syntax/RtfToken.cs#L42)

Literal text value for [RtfTokenKind.Text](/api/rtf/officeimo-rtf-syntax-rtftokenkind/) tokens.

`public string? ControlName { get; }` [#](#property-controlname)

[RtfToken.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Syntax/RtfToken.cs#L45)

Control word name without the leading backslash.

`public char? ControlSymbol { get; }` [#](#property-controlsymbol)

[RtfToken.cs:48](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Syntax/RtfToken.cs#L48)

Control symbol character without the leading backslash.

`public int? Parameter { get; }` [#](#property-parameter)

[RtfToken.cs:51](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Syntax/RtfToken.cs#L51)

Optional numeric parameter for control words and hex-encoded symbols.

`public bool HasParameter { get; }` [#](#property-hasparameter)

[RtfToken.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Syntax/RtfToken.cs#L54)

Whether the control explicitly supplied a numeric parameter.

`public byte[]? BinaryData { get; }` [#](#property-binarydata)

[RtfToken.cs:57](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Syntax/RtfToken.cs#L57)

Binary payload following a \binN control word.

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