# YamlDocumentPartFluent

The fluent methods of YamlDocumentPart, generated from its public properties: A property-named method sets a property and a singular-named method adds…

Class 

`OfficeIMO.Yaml`

**Namespace**

`OfficeIMO.Yaml`

**Assembly**

`OfficeIMO.Yaml`

**Modifiers**

static

The fluent methods of [YamlDocumentPart](/api/yaml/officeimo-yaml-yamldocumentpart/), generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.

## Inheritance

- object
- YamlDocumentPartFluent

Filter members 

Show inherited

## Methods

`public static YamlDocumentPart LeadingComment(YamlDocumentPart yamlDocumentPart, string? text)` [#](#method-leadingcomment-officeimo-yaml-yamldocumentpart-string)

Replaces the header comments; each line of text becomes one # line comment. In a document without --- a blank line follows them so they stay the document's. null removes them.

Parameters

**yamlDocumentPart OfficeIMO.Yaml.YamlDocumentPart required**

The instance.

**text string? required**

The value.

Returns

`YamlDocumentPart` The same instance.

`public static YamlDocumentPart MarkerComment(YamlDocumentPart yamlDocumentPart, string? text)` [#](#method-markercomment-officeimo-yaml-yamldocumentpart-string)

Sets the comment at the end of the --- line, or removes it with null. In a document added by editing whose root is a scalar or flow collection, the root is written on the --- line and the comment follows it.

Parameters

**yamlDocumentPart OfficeIMO.Yaml.YamlDocumentPart required**

The instance.

**text string? required**

The value.

Returns

`YamlDocumentPart` The same instance.

`public static YamlDocumentPart TrailingComment(YamlDocumentPart yamlDocumentPart, string? text)` [#](#method-trailingcomment-officeimo-yaml-yamldocumentpart-string)

Replaces the comment lines after the root's last line; null removes them.

Parameters

**yamlDocumentPart OfficeIMO.Yaml.YamlDocumentPart required**

The instance.

**text string? required**

The value.

Returns

`YamlDocumentPart` The same instance.

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

<!-- PowerForge markdown artifact sha256:79371CF599B75845C2845B7B5F33495E8AABD4C9335A6B7CAF1CF2A04B29E6D7 -->
