StringExtensions.ToInt32Array method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Strings.Extensions
Assembly Skybrud.Essentials.dll

ToInt32Array(string)

Extension method

Parses a string of numeric values into an array of int . Values in the list that can't be converted to int will be ignored.

public static Int32[] ToInt32Array(this string str)

Parameters

str String

The comma separated string to be converted.

Returns

Array of int

An array of int .

ToInt32Array(string, Char[])

Extension method

Parses a string of numeric values into an array of int . Values in the list that can't be converted to int will be ignored.

public static Int32[] ToInt32Array(this string str, Char[] separators)

Parameters

str String

The comma separated string to be converted.

separators Array of Char

An array of supported separators.

Returns

Array of int

An array of int .