Click or drag to resize

EnumerableExtensionsConvertToStringT Method

[This is preliminary documentation and is subject to change.]

Converts an IEnumerableT into a string, with each item separated by separator

Namespace:  CSInfrastructure.Extensions
Assembly:  CSInfrastructure (in CSInfrastructure.dll) Version: 1.13.0+Branch.master.Sha.d583fc64569355d188a9c0818d257b6d0d3e1339
Syntax
C#
public static string ConvertToString<T>(
	this IEnumerable<T> data,
	Func<T, string> convertor,
	char separator = ';'
)

Parameters

data
Type: System.Collections.GenericIEnumerableT
The collection to convert
convertor
Type: SystemFuncT, String
A function to be executed on each item in the collection, returning a string representing the item
separator (Optional)
Type: SystemChar
The separator used to separate the items in the string

Type Parameters

T
The type of items in the collection

Return Value

Type: String
A string containing all items from the provided collection, separated by a separator

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. 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