mscorlib(4.0.0.0) API with additions
KeyValuePair.cs
1
using
System
.
Text
;
2
3
namespace
System.Collections.Generic
4
{
8
[
Serializable
]
9
[__DynamicallyInvokable]
10
public
struct
KeyValuePair
<TKey, TValue>
11
{
12
private
TKey key;
13
14
private
TValue value;
15
18
[__DynamicallyInvokable]
19
public
TKey
Key
20
{
21
[__DynamicallyInvokable]
22
get
23
{
24
return
key;
25
}
26
}
27
30
[__DynamicallyInvokable]
31
public
TValue
Value
32
{
33
[__DynamicallyInvokable]
34
get
35
{
36
return
value;
37
}
38
}
39
43
[__DynamicallyInvokable]
44
public
KeyValuePair
(TKey key, TValue value)
45
{
46
this.key = key;
47
this.value = value;
48
}
49
52
[__DynamicallyInvokable]
53
public
override
string
ToString
()
54
{
55
StringBuilder
stringBuilder = StringBuilderCache.Acquire();
56
stringBuilder.
Append
(
'['
);
57
if
(
Key
!=
null
)
58
{
59
stringBuilder.
Append
(
Key
.ToString());
60
}
61
stringBuilder.
Append
(
", "
);
62
if
(
Value
!=
null
)
63
{
64
stringBuilder.
Append
(
Value
.ToString());
65
}
66
stringBuilder.
Append
(
']'
);
67
return
StringBuilderCache.GetStringAndRelease(stringBuilder);
68
}
69
}
70
}
System.Text
Definition:
ASCIIEncoding.cs:4
System.Collections.Generic.KeyValuePair.Value
TValue Value
Gets the value in the key/value pair.
Definition:
KeyValuePair.cs:32
System.Collections.Generic
Definition:
ArrayBuilder.cs:1
System
Definition:
__Canon.cs:3
System.Collections.Generic.KeyValuePair
Defines a key/value pair that can be set or retrieved.
Definition:
KeyValuePair.cs:10
System.Collections.Generic.KeyValuePair.Key
TKey Key
Gets the key in the key/value pair.
Definition:
KeyValuePair.cs:20
System.Text.StringBuilder.Append
StringBuilder Append(char value, int repeatCount)
Appends a specified number of copies of the string representation of a Unicode character to this inst...
Definition:
StringBuilder.cs:540
System.Collections.Generic.KeyValuePair.KeyValuePair
KeyValuePair(TKey key, TValue value)
Initializes a new instance of the T:System.Collections.Generic.KeyValuePair`2 structure with the spec...
Definition:
KeyValuePair.cs:44
System.Text.StringBuilder
Represents a mutable string of characters. This class cannot be inherited.To browse the ....
Definition:
StringBuilder.cs:14
System.Reflection.TypeAttributes.Serializable
Specifies that the class can be serialized.
System.Collections.Generic.KeyValuePair.ToString
override string ToString()
Returns a string representation of the T:System.Collections.Generic.KeyValuePair`2,...
Definition:
KeyValuePair.cs:53
All cs
System.Collections.Generic
KeyValuePair.cs
Generated by
1.8.15