Table of Contents

Class NbtComparer

Namespace
fNbt
Assembly
fNbt.dll

Compares tags for equality by type, name, and value. Compound tags are equal when they contain equal sets of tags; list tags when their elements are equal and in the same order. Name comparisons are case-sensitive.

public sealed class NbtComparer : IEqualityComparer<NbtTag>
Inheritance
NbtComparer
Implements
Inherited Members

Properties

Instance

Gets a singleton instance of the NbtComparer.

public static NbtComparer Instance { get; }

Property Value

NbtComparer

Methods

Equals(NbtTag?, NbtTag?)

Determines whether the specified objects are equal.

public bool Equals(NbtTag? x, NbtTag? y)

Parameters

x NbtTag

The first object of type T to compare.

y NbtTag

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Exceptions

ArgumentException

Either tag is nested more than 512 levels deep.

GetHashCode(NbtTag)

Returns a hash code for the specified object.

public int GetHashCode(NbtTag tag)

Parameters

tag NbtTag

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.