Show / Hide Table of Contents

Class EnumerableToString

Extension method equivalents to static methods from String that apply to enumerables.

Inheritance
Object
EnumerableToString
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Hgk.Zero.Strings.Linq
Assembly: Hgk.Zero.Strings.dll
Syntax
public static class EnumerableToString

Methods

| Improve this Doc View Source

ConcatToString(IEnumerable<String>)

Concatenates the elements of a string sequence.

Declaration
public static string ConcatToString(this IEnumerable<string> values)
Parameters
Type Name Description
IEnumerable<String> values

The string values to concatenate.

Returns
Type Description
String

The concatenation of the values in values.

Remarks

This method returns the result of calling Concat(IEnumerable<String>).

Exceptions
Type Condition
ArgumentNullException

values is null.

| Improve this Doc View Source

ConcatToString(Object[])

Concatenates the string representations of the elements of an array.

Declaration
public static string ConcatToString(this object[] values)
Parameters
Type Name Description
Object[] values

The values to concatenate.

Returns
Type Description
String

The concatenation of the string representations of the values in values.

Remarks

This method returns the result of calling Concat(Object[]).

Exceptions
Type Condition
ArgumentNullException

values is null.

| Improve this Doc View Source

ConcatToString(String[])

Concatenates the elements of a string array.

Declaration
public static string ConcatToString(this string[] values)
Parameters
Type Name Description
String[] values

The string values to concatenate.

Returns
Type Description
String

The concatenation of the values in values.

Remarks

This method returns the result of calling Concat(String[]).

Exceptions
Type Condition
ArgumentNullException

values is null.

| Improve this Doc View Source

ConcatToString<T>(IEnumerable<T>)

Concatenates the string representations of the elements of a sequence.

Declaration
public static string ConcatToString<T>(this IEnumerable<T> values)
Parameters
Type Name Description
IEnumerable<T> values

The values to concatenate.

Returns
Type Description
String

The concatenation of the string representations of the values in values.

Type Parameters
Name Description
T

The type of the members of values.

Remarks

This method returns the result of calling Concat<T>(IEnumerable<T>).

Exceptions
Type Condition
ArgumentNullException

values is null.

| Improve this Doc View Source

JoinToString(IEnumerable<String>, String)

Concatenates the elements of a string sequence using the specified string as a separator.

Declaration
public static string JoinToString(this IEnumerable<string> values, string separator)
Parameters
Type Name Description
IEnumerable<String> values

The string values to concatenate.

String separator

A string to use as a separator. (If null, an empty string is used.)

Returns
Type Description
String

The concatenation of the values in values, delimited by separator, if values contains any elements; otherwise, an empty string.

Remarks

This method returns the result of calling Join(String, IEnumerable<String>).

Exceptions
Type Condition
ArgumentNullException

values is null.

| Improve this Doc View Source

JoinToString(Object[], String)

Concatenates the string representation of the elements of an array using the specified string as a separator.

Declaration
public static string JoinToString(this object[] values, string separator)
Parameters
Type Name Description
Object[] values

The values to concatenate.

String separator

A string to use as a separator. (If null, an empty string is used.)

Returns
Type Description
String

The concatenation of the string representations of the values in values, delimited by separator, if values contains any elements; otherwise, an empty string.

Remarks

This method returns the result of calling Join(String, Object[]).

Exceptions
Type Condition
ArgumentNullException

values is null.

| Improve this Doc View Source

JoinToString(String[], Int32, Int32, String)

Concatenates the specified elements of a string array using the specified string as a separator.

Declaration
public static string JoinToString(this string[] values, int startIndex, int count, string separator)
Parameters
Type Name Description
String[] values

An array containing strings to concatenate.

Int32 startIndex

The first index of values to use.

Int32 count

The number of elements of values to use.

String separator

A string to use as a separator. (If null, an empty string is used.)

Returns
Type Description
String

The concatenation of the values in the specified range of values, delimited by separator, if the specified range contains any elements; otherwise, an empty string.

Remarks

This method returns the result of calling Join(String, String[], Int32, Int32).

Exceptions
Type Condition
ArgumentNullException

values is null.

ArgumentOutOfRangeException

startIndex or count is less than 0, or startIndex plus count is greater than the length of values.

| Improve this Doc View Source

JoinToString(String[], String)

Concatenates the elements of a string array using the specified string as a separator.

Declaration
public static string JoinToString(this string[] values, string separator)
Parameters
Type Name Description
String[] values

The string values to concatenate.

String separator

A string to use as a separator. (If null, an empty string is used.)

Returns
Type Description
String

The concatenation of the values in values, delimited by separator, if values contains any elements; otherwise, an empty string.

Remarks

This method returns the result of calling Join(String, String[]).

Exceptions
Type Condition
ArgumentNullException

values is null.

| Improve this Doc View Source

JoinToString<T>(IEnumerable<T>, String)

Concatenates the string representation of the elements of a sequence using the specified string as a separator.

Declaration
public static string JoinToString<T>(this IEnumerable<T> values, string separator)
Parameters
Type Name Description
IEnumerable<T> values

The values to concatenate.

String separator

A string to use as a separator. (If null, an empty string is used.)

Returns
Type Description
String

The concatenation of the string representations of the values in values, delimited by separator, if values contains any elements; otherwise, an empty string.

Type Parameters
Name Description
T

The type of the members of values.

Remarks

This method returns the result of calling Join<T>(String, IEnumerable<T>).

Exceptions
Type Condition
ArgumentNullException

values is null.

  • Improve this Doc
  • View Source
Back to top Copyright © 2018-2019 Peter S. May
Generated by DocFX