EnumUtils.ParseEnumArray method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Enums
Assembly Skybrud.Essentials.dll

ParseEnumArray<T>(string)

Static

Converts the specified str into an array of T.

public static T[] ParseEnumArray<T>(string str)

Type Parameters

T

The type of the enum.

Parameters

str String

A string value containing one or more enum values.

Returns

Array of T

An array of T with the converted values.

Exceptions

If T is not an enum class.

If one or more values can't be converted.

ParseEnumArray(string, Type)

Static

Converts the specified str into an array of type.

public static Array ParseEnumArray(string str, Type type)

Parameters

str String

A string value containing one or more enum values.

type Type

The enum type.

Returns

An instance of Array containing the parsed enum values.

ParseEnumArray(string, Type, Char[])

Static

Converts the specified str into an array of type.

public static Array ParseEnumArray(string str, Type type, Char[] separators)

Parameters

str String

A string value containing one or more enum values.

type Type

The enum type.

separators Array of Char

An array of supported separators.

Returns

An instance of Array containing the parsed enum values.

ParseEnumArray(String[], Type)

Static

Converts the specified array of pieces into an array of type.

public static Array ParseEnumArray(String[] pieces, Type type)

Parameters

pieces Array of String

Array of enum string representation.

type Type

The enum type.

Returns

An instanceo of Array containing the parsed enum values.