Struct KeyValuePair<K, V>
An entry in a dictionary from K to V.
Assembly: Lucene.Net.dll
Syntax
public struct KeyValuePair<K, V> : IEquatable<KeyValuePair<K, V>>, IShowable, IFormattable
Type Parameters
Constructors
|
Improve this Doc
View Source
KeyValuePair(K)
Create an entry with a specified key. The value will be the default value of type
V
.
Declaration
public KeyValuePair(K key)
Parameters
Type |
Name |
Description |
K |
key |
The key
|
|
Improve this Doc
View Source
KeyValuePair(K, V)
Create an entry with specified key and value
Declaration
public KeyValuePair(K key, V value)
Parameters
Type |
Name |
Description |
K |
key |
The key
|
V |
value |
The value
|
Fields
|
Improve this Doc
View Source
Key
The key field of the entry
Declaration
Field Value
|
Improve this Doc
View Source
Value
The value field of the entry
Declaration
Field Value
Methods
|
Improve this Doc
View Source
Equals(KeyValuePair<K, V>)
Declaration
public bool Equals(KeyValuePair<K, V> other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Equals(Object)
Check equality of entries.
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
The other object
|
Returns
Type |
Description |
System.Boolean |
True if obj is an entry of the same type and has the same key and value
|
|
Improve this Doc
View Source
GetHashCode()
Get the hash code of the pair.
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
The hash code
|
|
Improve this Doc
View Source
Show(System.Text.StringBuilder, ref Int32, IFormatProvider)
Declaration
public bool Show(System.Text.StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
stringbuilder |
|
System.Int32 |
rest |
|
IFormatProvider |
formatProvider |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
(key, value)
|
|
Improve this Doc
View Source
Declaration
public string ToString(string format, IFormatProvider formatProvider)
Parameters
Type |
Name |
Description |
System.String |
format |
|
IFormatProvider |
formatProvider |
|
Returns
Type |
Description |
System.String |
|
Operators
|
Improve this Doc
View Source
Equality(KeyValuePair<K, V>, KeyValuePair<K, V>)
Declaration
public static bool operator ==(KeyValuePair<K, V> pair1, KeyValuePair<K, V> pair2)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Inequality(KeyValuePair<K, V>, KeyValuePair<K, V>)
Declaration
public static bool operator !=(KeyValuePair<K, V> pair1, KeyValuePair<K, V> pair2)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
IEquatable<>
IFormattable