Table of Contents

Class NbtString

Namespace
fNbt
Assembly
fNbt.dll

A tag containing a single string. String is stored in UTF-8 encoding.

public sealed class NbtString : NbtTag, ICloneable
Inheritance
NbtString
Implements
Inherited Members

Constructors

NbtString()

Creates an unnamed NbtString tag with the default value (empty string).

public NbtString()

NbtString(string)

Creates an unnamed NbtString tag with the given value.

public NbtString(string value)

Parameters

value string

String value to assign to this tag. May not be null.

Exceptions

ArgumentNullException

value is null.

NbtString(string?, string)

Creates an NbtString tag with the given name and value.

public NbtString(string? tagName, string value)

Parameters

tagName string

Name to assign to this tag. May be null.

value string

String value to assign to this tag. May not be null.

Exceptions

ArgumentNullException

value is null.

NbtString(NbtString)

Creates a copy of given NbtString tag.

public NbtString(NbtString other)

Parameters

other NbtString

Tag to copy. May not be null.

Exceptions

ArgumentNullException

other is null.

Properties

TagType

Type of this tag (String).

public override NbtTagType TagType { get; }

Property Value

NbtTagType

Value

Value/payload of this tag (a single string). May not be null.

public string Value { get; set; }

Property Value

string

Methods

Clone()

Creates a deep copy of this tag.

public override object Clone()

Returns

object

A new NbtTag object that is a deep copy of this instance.