Table of Contents

Class XmlDictionaryEntry

Namespace
NanoByte.Common.Collections
Assembly
NanoByte.Common.dll

A key-value string pair for XmlDictionary.

public sealed class XmlDictionaryEntry : IEquatable<XmlDictionaryEntry>, ICloneable<XmlDictionaryEntry>
Inheritance
object
XmlDictionaryEntry
Implements
Extension Methods

Constructors

XmlDictionaryEntry()

Base-constructor for XML serialization. Do not call manually!

public XmlDictionaryEntry()

XmlDictionaryEntry(string, string)

Creates a new entry for XmlDictionary.

public XmlDictionaryEntry(string key, string value)

Parameters

key string

The unique text key.

value string

The text value.

Properties

Key

The unique text key. Warning: If this is changed the XmlDictionary must be rebuilt in order to update its internal hash table.

public string Key { get; set; }

Property Value

string

Exceptions

InvalidOperationException

The new key value already exists in the parent dictionary.

Value

The text value.

public string Value { get; set; }

Property Value

string

Methods

Clone()

Creates a plain copy of this entry.

public XmlDictionaryEntry Clone()

Returns

XmlDictionaryEntry

The cloned entry.

Equals(XmlDictionaryEntry?)

public bool Equals(XmlDictionaryEntry? other)

Parameters

other XmlDictionaryEntry

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(XmlDictionaryEntry, XmlDictionaryEntry)

public static bool operator ==(XmlDictionaryEntry left, XmlDictionaryEntry right)

Parameters

left XmlDictionaryEntry
right XmlDictionaryEntry

Returns

bool

operator !=(XmlDictionaryEntry, XmlDictionaryEntry)

public static bool operator !=(XmlDictionaryEntry left, XmlDictionaryEntry right)

Parameters

left XmlDictionaryEntry
right XmlDictionaryEntry

Returns

bool