IEnumerableExtensionsStringJoin Method (IEnumerable, String, Int32, String) |
Creates a delimited string from a sequence of elements. At most maxLength elements will be used and "..." shows that more elements were in the list.
Namespace: Bio.UtilAssembly: Bio.Core (in Bio.Core.dll) Version: 2.0.0.1 (2.0.0.1)
Syntax public static string StringJoin(
this IEnumerable sequence,
string separator,
int maxLength,
string etcString
)
<ExtensionAttribute>
Public Shared Function StringJoin (
sequence As IEnumerable,
separator As String,
maxLength As Integer,
etcString As String
) As String
public:
[ExtensionAttribute]
static String^ StringJoin(
IEnumerable^ sequence,
String^ separator,
int maxLength,
String^ etcString
)
[<ExtensionAttribute>]
static member StringJoin :
sequence : IEnumerable *
separator : string *
maxLength : int *
etcString : string -> string
Parameters
- sequence
- Type: System.CollectionsIEnumerable
a sequence - separator
- Type: SystemString
the delimiter - maxLength
- Type: SystemInt32
the maximum number of elements in the string. It must be at least 2 or an exception is thrown. - etcString
- Type: SystemString
the string to use of more than maxLength elements are found
Return Value
Type:
Stringa string
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerable. 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