# OfficeMathExpression

An immutable node in a reusable mathematical expression tree.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeMathExpression.cs:144](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L144)

**Implements**

`IEquatable<OfficeMathExpression>`

**Modifiers**

sealed

An immutable node in a reusable mathematical expression tree.

## Inheritance

- object
- OfficeMathExpression

## Usage

Explore 75 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 33

- Method [OfficeMath.Accent](/api/core/officeimo-drawing-officemath/#method-accent-officeimo-drawing-officemathexpression-string)
- Method [OfficeMath.Box](/api/core/officeimo-drawing-officemath/#method-box-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Delimited](/api/core/officeimo-drawing-officemath/#method-delimited-officeimo-drawing-officemathexpression-string-string)
- Method [OfficeMath.DelimiterList](/api/core/officeimo-drawing-officemath/#method-delimiterlist-string-string-string-officeimo-drawing-officemathexpression)
- Method [OfficeMath.EquationArray](/api/core/officeimo-drawing-officemath/#method-equationarray-int32-int32-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Fraction](/api/core/officeimo-drawing-officemath/#method-fraction-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Function](/api/core/officeimo-drawing-officemath/#method-function-string-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Identifier](/api/core/officeimo-drawing-officemath/#method-identifier-string)
- Method [OfficeMath.LeftSubSuperscript](/api/core/officeimo-drawing-officemath/#method-leftsubsuperscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression)
- Method [OfficeMath.LowerLimit](/api/core/officeimo-drawing-officemath/#method-lowerlimit-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Matrix](/api/core/officeimo-drawing-officemath/#method-matrix-int32-int32-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Nary](/api/core/officeimo-drawing-officemath/#method-nary-string-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Number](/api/core/officeimo-drawing-officemath/#method-number-string)
- Method [OfficeMath.Operator](/api/core/officeimo-drawing-officemath/#method-operator-string)
- Method [OfficeMath.Overbar](/api/core/officeimo-drawing-officemath/#method-overbar-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Phantom](/api/core/officeimo-drawing-officemath/#method-phantom-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Radical](/api/core/officeimo-drawing-officemath/#method-radical-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Row](/api/core/officeimo-drawing-officemath/#method-row-officeimo-drawing-officemathexpression)
- Method [OfficeMath.SlashedFraction](/api/core/officeimo-drawing-officemath/#method-slashedfraction-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Stack](/api/core/officeimo-drawing-officemath/#method-stack-officeimo-drawing-officemathexpression)
- Method [OfficeMath.StretchStack](/api/core/officeimo-drawing-officemath/#method-stretchstack-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Subscript](/api/core/officeimo-drawing-officemath/#method-subscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression)
- Method [OfficeMath.SubSuperscript](/api/core/officeimo-drawing-officemath/#method-subsuperscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Superscript](/api/core/officeimo-drawing-officemath/#method-superscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression)
- Method [OfficeMath.Text](/api/core/officeimo-drawing-officemath/#method-text-string)
- Method [OfficeMath.Underbar](/api/core/officeimo-drawing-officemath/#method-underbar-officeimo-drawing-officemathexpression)
- Method [OfficeMath.UpperLimit](/api/core/officeimo-drawing-officemath/#method-upperlimit-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression)
- Method [OfficeMathExpression.TransformTextCase](/api/core/officeimo-drawing-officemathexpression/#method-transformtextcase-officeimo-drawing-officetextcase-globalization-cultureinfo)
- Property [OfficeMathExpression.Children](/api/core/officeimo-drawing-officemathexpression/#property-children)
- Property [OfficeMathExpression.NaryLowerLimit](/api/core/officeimo-drawing-officemathexpression/#property-narylowerlimit)
- Property [OfficeMathExpression.NaryUpperLimit](/api/core/officeimo-drawing-officemathexpression/#property-naryupperlimit)
- Method [OfficeMathMarkup.FromLatex](/api/core/officeimo-drawing-officemathmarkup/#method-fromlatex-string)
- Method [OfficeMathMarkup.FromMathMl](/api/core/officeimo-drawing-officemathmarkup/#method-frommathml-string)

### Accepted by parameters 42

- Method [OfficeMath.Accent](/api/core/officeimo-drawing-officemath/#method-accent-officeimo-drawing-officemathexpression-string) parameter `content`
- Method [OfficeMath.Box](/api/core/officeimo-drawing-officemath/#method-box-officeimo-drawing-officemathexpression) parameter `content`
- Method [OfficeMath.Delimited](/api/core/officeimo-drawing-officemath/#method-delimited-officeimo-drawing-officemathexpression-string-string) parameter `content`
- Method [OfficeMath.DelimiterList](/api/core/officeimo-drawing-officemath/#method-delimiterlist-string-string-string-officeimo-drawing-officemathexpression) parameter `items`
- Method [OfficeMath.EquationArray](/api/core/officeimo-drawing-officemath/#method-equationarray-int32-int32-officeimo-drawing-officemathexpression) parameter `cells`
- Method [OfficeMath.Fraction](/api/core/officeimo-drawing-officemath/#method-fraction-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `denominator`
- Method [OfficeMath.Fraction](/api/core/officeimo-drawing-officemath/#method-fraction-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `numerator`
- Method [OfficeMath.Function](/api/core/officeimo-drawing-officemath/#method-function-string-officeimo-drawing-officemathexpression) parameter `argument`
- Method [OfficeMath.LeftSubSuperscript](/api/core/officeimo-drawing-officemath/#method-leftsubsuperscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `basis`
- Method [OfficeMath.LeftSubSuperscript](/api/core/officeimo-drawing-officemath/#method-leftsubsuperscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `subscript`
- Method [OfficeMath.LeftSubSuperscript](/api/core/officeimo-drawing-officemath/#method-leftsubsuperscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `superscript`
- Method [OfficeMath.LowerLimit](/api/core/officeimo-drawing-officemath/#method-lowerlimit-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `basis`
- Method [OfficeMath.LowerLimit](/api/core/officeimo-drawing-officemath/#method-lowerlimit-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `limit`
- Method [OfficeMath.Matrix](/api/core/officeimo-drawing-officemath/#method-matrix-int32-int32-officeimo-drawing-officemathexpression) parameter `cells`
- Method [OfficeMath.Nary](/api/core/officeimo-drawing-officemath/#method-nary-string-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `content`
- Method [OfficeMath.Nary](/api/core/officeimo-drawing-officemath/#method-nary-string-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `lower`
- Method [OfficeMath.Nary](/api/core/officeimo-drawing-officemath/#method-nary-string-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `upper`
- Method [OfficeMath.Overbar](/api/core/officeimo-drawing-officemath/#method-overbar-officeimo-drawing-officemathexpression) parameter `content`
- Method [OfficeMath.Phantom](/api/core/officeimo-drawing-officemath/#method-phantom-officeimo-drawing-officemathexpression) parameter `content`
- Method [OfficeMath.Radical](/api/core/officeimo-drawing-officemath/#method-radical-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `content`
- Method [OfficeMath.Radical](/api/core/officeimo-drawing-officemath/#method-radical-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `index`
- Method [OfficeMath.Row](/api/core/officeimo-drawing-officemath/#method-row-officeimo-drawing-officemathexpression) parameter `children`
- Method [OfficeMath.SlashedFraction](/api/core/officeimo-drawing-officemath/#method-slashedfraction-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `denominator`
- Method [OfficeMath.SlashedFraction](/api/core/officeimo-drawing-officemath/#method-slashedfraction-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `numerator`
- Method [OfficeMath.Stack](/api/core/officeimo-drawing-officemath/#method-stack-officeimo-drawing-officemathexpression) parameter `rows`
- Method [OfficeMath.StretchStack](/api/core/officeimo-drawing-officemath/#method-stretchstack-officeimo-drawing-officemathexpression) parameter `rows`
- Method [OfficeMath.Subscript](/api/core/officeimo-drawing-officemath/#method-subscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `basis`
- Method [OfficeMath.Subscript](/api/core/officeimo-drawing-officemath/#method-subscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `script`
- Method [OfficeMath.SubSuperscript](/api/core/officeimo-drawing-officemath/#method-subsuperscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `basis`
- Method [OfficeMath.SubSuperscript](/api/core/officeimo-drawing-officemath/#method-subsuperscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `subscript`
- Method [OfficeMath.SubSuperscript](/api/core/officeimo-drawing-officemath/#method-subsuperscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `superscript`
- Method [OfficeMath.Superscript](/api/core/officeimo-drawing-officemath/#method-superscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `basis`
- Method [OfficeMath.Superscript](/api/core/officeimo-drawing-officemath/#method-superscript-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `script`
- Method [OfficeMath.Underbar](/api/core/officeimo-drawing-officemath/#method-underbar-officeimo-drawing-officemathexpression) parameter `content`
- Method [OfficeMath.UpperLimit](/api/core/officeimo-drawing-officemath/#method-upperlimit-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `basis`
- Method [OfficeMath.UpperLimit](/api/core/officeimo-drawing-officemath/#method-upperlimit-officeimo-drawing-officemathexpression-officeimo-drawing-officemathexpression) parameter `limit`
- Method [OfficeMathExpression.Equals](/api/core/officeimo-drawing-officemathexpression/#method-equals-officeimo-drawing-officemathexpression) parameter `other`
- Method [OfficeMathMarkup.ToLatex](/api/core/officeimo-drawing-officemathmarkup/#method-tolatex-officeimo-drawing-officemathexpression) parameter `expression`
- Method [OfficeMathMarkup.ToMathMl](/api/core/officeimo-drawing-officemathmarkup/#method-tomathml-officeimo-drawing-officemathexpression-boolean) parameter `expression`
- Method [OfficeMathRenderer.AddToDrawing](/api/core/officeimo-drawing-officemathrenderer/#method-addtodrawing-officeimo-drawing-officedrawing-officeimo-drawing-officemathexpression-double-double-officeimo-drawing-officemathrenderoptions) parameter `expression`
- Method [OfficeMathRenderer.Measure](/api/core/officeimo-drawing-officemathrenderer/#method-measure-officeimo-drawing-officemathexpression-officeimo-drawing-officemathrenderoptions) parameter `expression`
- Method [OfficeMathRenderer.Render](/api/core/officeimo-drawing-officemathrenderer/#method-render-officeimo-drawing-officemathexpression-officeimo-drawing-officemathrenderoptions) parameter `expression`

Filter members 

Show inherited

## Methods

Equals 2 overloads

`public bool Equals(OfficeMathExpression? other)` [#](#method-equals-officeimo-drawing-officemathexpression)

[OfficeMathExpression.cs:280](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L280)

Indicates whether the current object is equal to another object of the same type.

Parameters

**other OfficeIMO.Drawing.OfficeMathExpression? required**

An object to compare with this object.

Returns

`bool` true if the current object is equal to the other parameter; otherwise, false.

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

[OfficeMathExpression.cs:293](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L293)

Determines whether the specified object is equal to the current object.

Parameters

**obj object? required**

The object to compare with the current object.

Returns

`bool` true if the specified object is equal to the current object; otherwise, false.

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

[OfficeMathExpression.cs:298](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L298)

Serves as the default hash function.

Returns

`int` A hash code for the current object.

`public string ToPlainText()` [#](#method-toplaintext)

[OfficeMathExpression.cs:144](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L144)

Returns a readable plain-text projection.

Returns

`string`

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

[OfficeMathExpression.cs:202](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L202)

Returns a string that represents the current object.

Returns

`string` A string that represents the current object.

`public OfficeMathExpression TransformTextCase(OfficeTextCase textCase, CultureInfo? culture = null)` [#](#method-transformtextcase-officeimo-drawing-officetextcase-globalization-cultureinfo)

[OfficeMathExpression.cs:208](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L208)

Returns a structurally equivalent expression with cased text and identifier tokens transformed.

Parameters

**textCase OfficeIMO.Drawing.OfficeTextCase required**

Transformation to apply.

**culture System.Globalization.CultureInfo? = null optional**

Culture used for casing. The current culture is used when omitted.

Returns

`OfficeMathExpression`

## Inherited Methods

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

Inherited from object

Returns

`Type`

## Properties

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

[OfficeMathExpression.cs:102](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L102)

Node kind.

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

[OfficeMathExpression.cs:105](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L105)

Token text for text, identifier, number, operator, or function nodes.

`public string? Character { get; }` [#](#property-character)

[OfficeMathExpression.cs:117](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L117)

Primary delimiter, accent, or n-ary operator character.

`public string? SecondaryCharacter { get; }` [#](#property-secondarycharacter)

[OfficeMathExpression.cs:120](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L120)

Secondary delimiter character.

`public string? SeparatorCharacter { get; }` [#](#property-separatorcharacter)

[OfficeMathExpression.cs:123](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L123)

Separator used by a delimiter list.

`public IReadOnlyList<OfficeMathExpression> Children { get; }` [#](#property-children)

[OfficeMathExpression.cs:126](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L126)

Child expressions in semantic order.

`public OfficeMathExpression? NaryLowerLimit { get; }` [#](#property-narylowerlimit)

[OfficeMathExpression.cs:130](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L130)

Lower limit for an n-ary expression, or null when omitted.

`public OfficeMathExpression? NaryUpperLimit { get; }` [#](#property-naryupperlimit)

[OfficeMathExpression.cs:134](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L134)

Upper limit for an n-ary expression, or null when omitted.

`public int RowCount { get; }` [#](#property-rowcount)

[OfficeMathExpression.cs:137](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L137)

Row count for matrix-like structures.

`public int ColumnCount { get; }` [#](#property-columncount)

[OfficeMathExpression.cs:140](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Math/OfficeMathExpression.cs#L140)

Column count for matrix-like structures.

<!-- PowerForge markdown artifact sha256:66156AAEF5039393E27A17847DC33A3C4073B6AD244A12889AEB754A562F3B57 -->
