Class NbtLongArray
- Namespace
- fNbt
- Assembly
- fNbt.dll
A tag containing an array of signed 64-bit integers.
public sealed class NbtLongArray : NbtTag, ICloneable
- Inheritance
-
NbtLongArray
- Implements
- Inherited Members
Constructors
NbtLongArray()
Creates an unnamed NbtLongArray tag, containing an empty array of longs.
public NbtLongArray()
NbtLongArray(long[])
Creates an unnamed NbtLongArray tag, containing the given array of longs.
public NbtLongArray(long[] value)
Parameters
valuelong[]Long array to assign to this tag's Value. May not be
null.
Remarks
Given long array will be cloned. To avoid unnecessary copying, call one of the other constructor overloads (that do not take a long[]) and then set the Value property yourself.
Exceptions
- ArgumentNullException
valueisnull.
NbtLongArray(string?)
Creates an NbtLongArray tag with the given name, containing an empty array of longs.
public NbtLongArray(string? tagName)
Parameters
tagNamestringName to assign to this tag. May be
null.
NbtLongArray(string?, long[])
Creates an NbtLongArray tag with the given name, containing the given array of longs.
public NbtLongArray(string? tagName, long[] value)
Parameters
tagNamestringName to assign to this tag. May be
null.valuelong[]Long array to assign to this tag's Value. May not be
null.
Remarks
Given long array will be cloned. To avoid unnecessary copying, call one of the other constructor overloads (that do not take a long[]) and then set the Value property yourself.
Exceptions
- ArgumentNullException
valueisnull.
NbtLongArray(NbtLongArray)
Creates a deep copy of given NbtLongArray.
public NbtLongArray(NbtLongArray other)
Parameters
otherNbtLongArrayTag to copy. May not be
null.
Remarks
Long array of given tag will be cloned.
Exceptions
- ArgumentNullException
otherisnull.
Properties
this[int]
Gets or sets a long at the given index.
public long this[int index] { get; set; }
Parameters
indexintThe zero-based index of the element to get or set.
Property Value
- long
The long at the specified index.
Exceptions
- IndexOutOfRangeException
indexis outside the array bounds.
TagType
Type of this tag (LongArray).
public override NbtTagType TagType { get; }
Property Value
Value
Value/payload of this tag (an array of signed 64-bit integers). Value is stored as-is and is NOT cloned. May not be null.
public long[] Value { get; set; }
Property Value
- long[]
Exceptions
- ArgumentNullException
valueisnull.
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.