C5  2.4
The C5 Generic Collection Library for C# and CLI is a comprehensive collection library supporting lists, sets, bags, dictionaries, priority queues, (FIFO) queues, and (LIFO) stacks. C5 runs on .NET 3.5+, Silverlight 5, Windows Phone 8, Xamarin.iOS, Xamarin.Android, and Mono.
C5.KeyValuePair< K, V > Class Template Reference

An entry in a dictionary from K to V. More...

Inheritance diagram for C5.KeyValuePair< K, V >:
C5.IShowable

Public Member Functions

 KeyValuePair (K key, V value)
 Create an entry with specified key and value More...
 
 KeyValuePair (K key)
 Create an entry with a specified key. The value will be the default value of type More...
 
override string ToString ()
 Pretty print an entry More...
 
override bool Equals (object obj)
 Check equality of entries. More...
 
override int GetHashCode ()
 Get the hash code of the pair. More...
 
bool Equals (KeyValuePair< K, V > other)
 
bool Show (System.Text.StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider)
 
string ToString (string format, IFormatProvider formatProvider)
 
- Public Member Functions inherited from C5.IShowable
bool Show (StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider)
 Format More...
 

Static Public Member Functions

static bool operator== (KeyValuePair< K, V > pair1, KeyValuePair< K, V > pair2)
 
static bool operator!= (KeyValuePair< K, V > pair1, KeyValuePair< K, V > pair2)
 
static KeyValuePair< K, V > Create< K, V > (K key, V value)
 Create an instance of the KeyValuePair using type inference. More...
 

Public Attributes

Key
 The key field of the entry More...
 
Value
 The value field of the entry More...
 

Detailed Description

An entry in a dictionary from K to V.

Static class to allow creation of KeyValuePair using type inference

Constructor & Destructor Documentation

C5.KeyValuePair< K, V >.KeyValuePair ( key,
value 
)

Create an entry with specified key and value

Parameters
keyThe key
valueThe value
C5.KeyValuePair< K, V >.KeyValuePair ( key)

Create an entry with a specified key. The value will be the default value of type

V.

Parameters
keyThe key

Member Function Documentation

static KeyValuePair<K, V> C5.KeyValuePair< K, V >.Create< K, V > ( key,
value 
)
static

Create an instance of the KeyValuePair using type inference.

override bool C5.KeyValuePair< K, V >.Equals ( object  obj)

Check equality of entries.

Parameters
objThe other object
Returns
True if obj is an entry of the same type and has the same key and value
bool C5.KeyValuePair< K, V >.Equals ( KeyValuePair< K, V >  other)

Parameters
other
Returns
override int C5.KeyValuePair< K, V >.GetHashCode ( )

Get the hash code of the pair.

Returns
The hash code
static bool C5.KeyValuePair< K, V >.operator!= ( KeyValuePair< K, V >  pair1,
KeyValuePair< K, V >  pair2 
)
static

Parameters
pair1
pair2
Returns
static bool C5.KeyValuePair< K, V >.operator== ( KeyValuePair< K, V >  pair1,
KeyValuePair< K, V >  pair2 
)
static

Parameters
pair1
pair2
Returns
bool C5.KeyValuePair< K, V >.Show ( System.Text.StringBuilder  stringbuilder,
ref int  rest,
IFormatProvider  formatProvider 
)

Parameters
stringbuilder
formatProvider
rest
Returns
override string C5.KeyValuePair< K, V >.ToString ( )

Pretty print an entry

Returns
(key, value)
string C5.KeyValuePair< K, V >.ToString ( string  format,
IFormatProvider  formatProvider 
)

Parameters
format
formatProvider
Returns

Member Data Documentation

K C5.KeyValuePair< K, V >.Key

The key field of the entry

V C5.KeyValuePair< K, V >.Value

The value field of the entry


The documentation for this class was generated from the following file: