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
valuestringString value to assign to this tag. May not be
null.
Exceptions
- ArgumentNullException
valueisnull.
NbtString(string?, string)
Creates an NbtString tag with the given name and value.
public NbtString(string? tagName, string value)
Parameters
tagNamestringName to assign to this tag. May be
null.valuestringString value to assign to this tag. May not be
null.
Exceptions
- ArgumentNullException
valueisnull.
NbtString(NbtString)
Creates a copy of given NbtString tag.
public NbtString(NbtString other)
Parameters
otherNbtStringTag to copy. May not be
null.
Exceptions
- ArgumentNullException
otherisnull.
Properties
TagType
Type of this tag (String).
public override NbtTagType TagType { get; }
Property Value
Value
Value/payload of this tag (a single string). May not be null.
public string Value { get; set; }
Property Value
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.