A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://dotnet.github.io/dotNext/api/DotNext.EnumConverter.html below:

Class EnumConverter | .NEXT

Class EnumConverter

Provides conversion between enum value and primitive types.

Inheritance

EnumConverter

Namespace: DotNext Assembly: DotNext.dll Syntax
public static class EnumConverter
Methods | Edit this page View Source

Converts enum value to numeric value.

Declaration
[CLSCompliant(false)]
public static TValue FromEnum<TEnum, TValue>(TEnum value) where TEnum : struct, Enum where TValue : unmanaged, INumberBase<TValue>, IConvertible
Parameters Type Name Description TEnum value

The enum value to convert.

Returns Type Description TValue

The numeric equivalent of value.

Type Parameters Name Description TEnum

The type of the enum.

TValue

The type of numeric value.

| Edit this page View Source GetTypeCode<TEnum>()

Gets underlying type of the enum.

Declaration
public static TypeCode GetTypeCode<TEnum>() where TEnum : struct, Enum
Returns Type Description TypeCode

The underlying type of TEnum.

Type Parameters Name Description TEnum

The type of the enum.

| Edit this page View Source ToEnum<TEnum, TValue>(TValue)

Converts a value of type TValue to enum of type TEnum.

Declaration
[CLSCompliant(false)]
public static TEnum ToEnum<TEnum, TValue>(TValue value) where TEnum : struct, Enum where TValue : unmanaged, INumberBase<TValue>, IConvertible
Parameters Type Name Description TValue value

The value to be converted.

Returns Type Description TEnum

The enum value that is equivalent to TEnum.

Type Parameters Name Description TEnum

The type of the enum.

TValue

The numeric type representing enum value.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4