Table of Contents

Class Joiner<T>

Namespace
SunamoCollectionsGeneric.Collections
Assembly
SunamoCollectionsGeneric.dll

Helper class for building a string by joining items with a separator

public class Joiner<T>

Type Parameters

T

The type of items to join

Inheritance
Joiner<T>
Inherited Members
Extension Methods

Constructors

Joiner()

Initializes a new instance with comma as the default separator

public Joiner()

Joiner(string, int)

Initializes a new instance with the specified separator and capacity

public Joiner(string joinWith, int capacity = 5)

Parameters

joinWith string

The separator string to use when joining items

capacity int

The initial capacity of the internal list

Methods

Add(T)

Adds a value to the collection

public void Add(T value)

Parameters

value T

The value to add

ToString()

Returns a string that represents the joined items

public override string ToString()

Returns

string

A string with all items joined by the separator