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
-
objectXmlDictionaryEntry
- 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
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
Exceptions
- InvalidOperationException
The new key value already exists in the parent dictionary.
Value
The text value.
public string Value { get; set; }
Property Value
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
otherXmlDictionaryEntry
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(XmlDictionaryEntry, XmlDictionaryEntry)
public static bool operator ==(XmlDictionaryEntry left, XmlDictionaryEntry right)
Parameters
leftXmlDictionaryEntryrightXmlDictionaryEntry
Returns
operator !=(XmlDictionaryEntry, XmlDictionaryEntry)
public static bool operator !=(XmlDictionaryEntry left, XmlDictionaryEntry right)
Parameters
leftXmlDictionaryEntryrightXmlDictionaryEntry