Show / Hide Table of Contents

    Class EnumUtilityExtensions

    This is an extension implementation of the most common methods on the EnumUtility class.

    Inheritance
    System.Object
    EnumUtilityExtensions
    Namespace: Cuemon
    Assembly: Cuemon.Core.dll
    Syntax
    public static class EnumUtilityExtensions

    Methods

    | Improve this Doc

    ToEnum<TEnum>(String)

    Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated TEnum.

    Declaration
    public static TEnum ToEnum<TEnum>(this string value)
        where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    System.String value

    A string containing the name or value to convert.

    Returns
    Type Description
    TEnum

    An enum of type TEnum whose value is represented by value.

    Type Parameters
    Name Description
    TEnum

    The type of the enumeration to convert.

    Exceptions
    Type Condition
    System.ArgumentNullException

    value is null.

    TypeArgumentException

    TEnum does not represents an enumeration.

    System.ArgumentException

    value does not represents an enumeration.

    | Improve this Doc

    ToEnum<TEnum>(String, Boolean)

    Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated TEnum.

    Declaration
    public static TEnum ToEnum<TEnum>(this string value, bool ignoreCase)
        where TEnum : struct, IConvertible
    Parameters
    Type Name Description
    System.String value

    A string containing the name or value to convert.

    System.Boolean ignoreCase

    true to ignore case; false to regard case.

    Returns
    Type Description
    TEnum

    An enum of type TEnum whose value is represented by value.

    Type Parameters
    Name Description
    TEnum

    The type of the enumeration to convert.

    Exceptions
    Type Condition
    System.ArgumentNullException

    value is null.

    TypeArgumentException

    TEnum does not represents an enumeration.

    System.ArgumentException

    value does not represents an enumeration.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX