AlgorithmsToStringTKey, TValue Method (IDictionaryTKey, TValue) |
Gets a string representation of the mappings in a dictionary.
The string representation starts with "{", has a list of mappings separated
by commas (", "), and ends with "}". Each mapping is represented
by "key->value". Each key and value in the dictionary is
converted to a string by calling its ToString method (null is represented by "null").
Contained collections (except strings) are recursively converted to strings by this method.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static string ToString<TKey, TValue>(
IDictionary<TKey, TValue> dictionary
)
public:
generic<typename TKey, typename TValue>
static String^ ToString(
IDictionary<TKey, TValue>^ dictionary
)
Parameters
- dictionary
- Type: System.Collections.GenericIDictionaryTKey, TValue
A dictionary to get the string representation of.
Type Parameters
- TKey
[Missing <typeparam name="TKey"/> documentation for "M:X3Platform.Collections.Algorithms.ToString``2(System.Collections.Generic.IDictionary{``0,``1})"]
- TValue
[Missing <typeparam name="TValue"/> documentation for "M:X3Platform.Collections.Algorithms.ToString``2(System.Collections.Generic.IDictionary{``0,``1})"]
Return Value
Type:
StringThe string representation of the collection, or "null"
if
dictionary is null.
See Also