EnumerableExtensionsToStringKeyedDictionaryTValue Method (IEnumerableTValue, FuncTValue, String, StringSegmentComparer)

KGy SOFT Core Libraries Help

Namespace:  KGySoft.CoreLibraries
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 6.0.0-rc.2

public static StringKeyedDictionary<TValue> ToStringKeyedDictionary<TValue>(
	this IEnumerable<TValue> source,
	Func<TValue, string> keySelector,
	StringSegmentComparer? comparer = null


Type: System.Collections.GenericIEnumerableTValue
The source collection to create a StringKeyedDictionaryTValue from.
Type: SystemFuncTValue, String
A delegate to produce a key for each element in the source collection.
comparer (Optional)
Type: KGySoft.CoreLibrariesStringSegmentComparer
A StringSegmentComparer to compare keys. If , then ordinal comparison will be used. This parameter is optional.
Default value: .

Type Parameters

The type of the elements in the source collection and the type of the values in the returned StringKeyedDictionaryTValue.

Return Value

Type: StringKeyedDictionaryTValue
A StringKeyedDictionaryTValue that contains the same values that are in source associated with keys returned created by the specified keySelector.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableTValue. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also