# YamlScalarFluent

The fluent methods of YamlScalar, 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 [YamlScalar](/api/yaml/officeimo-yaml-yamlscalar/), 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
- YamlScalarFluent

Filter members 

Show inherited

## Methods

`public static YamlScalar Anchor(YamlScalar yamlScalar, string? name)` [#](#method-anchor-officeimo-yaml-yamlscalar-string)

Sets, renames or removes (null) the node's anchor. Renaming updates every alias that refers to the node; removing an anchor that aliases still use fails.

Parameters

**yamlScalar OfficeIMO.Yaml.YamlScalar required**

The instance.

**name string? required**

The value.

Returns

`YamlScalar` The same instance.

`public static YamlScalar LeadingComment(YamlScalar yamlScalar, string? text)` [#](#method-leadingcomment-officeimo-yaml-yamlscalar-string)

Replaces the comment lines above the node's entry; each line of text becomes one # line comment at the entry's indentation. null or an empty string removes them.

Parameters

**yamlScalar OfficeIMO.Yaml.YamlScalar required**

The instance.

**text string? required**

The value.

Returns

`YamlScalar` The same instance.

`public static YamlScalar SpaceBefore(YamlScalar yamlScalar, bool value = true)` [#](#method-spacebefore-officeimo-yaml-yamlscalar-boolean)

Sets whether a blank line separates the node's entry from the previous content.

Parameters

**yamlScalar OfficeIMO.Yaml.YamlScalar required**

The instance.

**value bool = true optional**

The value. True when omitted.

Returns

`YamlScalar` The same instance.

`public static YamlScalar Tag(YamlScalar yamlScalar, string? tag)` [#](#method-tag-officeimo-yaml-yamlscalar-string)

Sets or removes (null) the node's tag, in the resolved form [YamlNode.Tag](/api/yaml/officeimo-yaml-yamlnode/) reports (tag:yaml.org,2002:str, !Ref). Tags change how a scalar resolves; they never activate .NET types.

Parameters

**yamlScalar OfficeIMO.Yaml.YamlScalar required**

The instance.

**tag string? required**

The value.

Returns

`YamlScalar` The same instance.

`public static YamlScalar TrailingComment(YamlScalar yamlScalar, string? text)` [#](#method-trailingcomment-officeimo-yaml-yamlscalar-string)

Sets the comment at the end of the node's line (value # text), or removes it with null.

Parameters

**yamlScalar OfficeIMO.Yaml.YamlScalar required**

The instance.

**text string? required**

The value.

Returns

`YamlScalar` 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:B4ACACD2A540E311A3DFB06D290043F4910DAEF21B0F0D1576539EE2042E1CB3 -->
