Extend.NET.Enum
2024.9.9.1414
dotnet add package Extend.NET.Enum --version 2024.9.9.1414
NuGet\Install-Package Extend.NET.Enum -Version 2024.9.9.1414
<PackageReference Include="Extend.NET.Enum" Version="2024.9.9.1414" />
paket add Extend.NET.Enum --version 2024.9.9.1414
#r "nuget: Extend.NET.Enum, 2024.9.9.1414"
// Install Extend.NET.Enum as a Cake Addin #addin nuget:?package=Extend.NET.Enum&version=2024.9.9.1414 // Install Extend.NET.Enum as a Cake Tool #tool nuget:?package=Extend.NET.Enum&version=2024.9.9.1414
Extend.NET.Enum
Last Updated: 2024-09-09 14:14:26
📖 Overview
Extend.NET.Enum is part of the Extend.NET suite, providing a collection of powerful and easy-to-use extension methods for Enum types in .NET applications. These extensions aim to simplify common tasks and enhance developer productivity.
🧰 Extension Methods
GetAttributeOfType
Gets the first attribute of the specified type from the enum value.
GetBitFlags
Gets all individual bit flags set in the enum value.
GetDescription
Gets the description of an enum value.
GetDisplayName
Gets the display name of an enum value.
GetEnumDescription
Gets the description of an enum value.
T
Creates a dictionary of enum values with their names as keys.
GetEnumIndex
Gets the index of the enum value in the enum definition order.
GetEnumNameByValue
Gets the name of the enum value by its underlying integer value.
GetEnumValueAsNullable
Tries to parse a string to the specified enum type, returning a nullable enum.
GetEnumValueByDescription
Gets the enum value that has the specified description attribute.
GetEnumValueByDisplayName
Gets the enum value that matches the specified display name.
GetEnumValueByIndex
Gets the enum value at the specified index.
GetEnumValueByName
Gets the enum value by its name.
GetEnumValueCount
Gets the count of distinct values in the enum.
GetEnumValueFromDescription
Gets the enum value that matches the specified description.
GetEnumValueFromInt
Converts an integer to its corresponding enum value.
GetEnumValueFromString
Converts a string to its corresponding enum value.
GetEnumValueOrDefault
Tries to parse a string to the specified enum type, returning a default value if parsing fails.
Min
Gets the range of integer values used in the enum.
GetEnumValues
Gets all values of the enum as a list.
T
Gets all enum values as a dictionary with display names as keys and enum values as values.
string
Gets all enum values as key-value pairs, where the key is the enum value and the value is its string representation.
GetEnumValuesAsStringArray
Gets all enum values as an array of strings.
GetEnumValuesBetween
Gets all enum values between two specified values (inclusive).
GetEnumValuesBetweenAsInt
Gets all integer values of enum members between two specified values (inclusive).
GetEnumValuesByAttribute
Gets all enum values that have the specified attribute with a matching property value.
GetEnumValuesByFlags
Gets all individual enum values that are set in a flags enum value.
GetEnumValuesExcept
Gets all enum values except the specified ones.
GetEnumValuesExceptFlags
Gets all enum values except those set in the specified flags enum value.
GetEnumValuesSorted
Gets all enum values sorted by their underlying integer value.
GetEnumValuesWithAttribute
Gets all enum values that have the specified attribute.
GetEnumValuesWithAttributeOfType
Gets all enum values that have an attribute of the specified type.
GetEnumValuesWithoutAttribute
Gets all enum values that do not have the specified attribute.
GetFlags
Gets all flags set in the enum value.
GetName
Gets the name of the enum value.
GetNames
Gets an array of the names of all the constants in the specified enumeration.
GetNextDistinctValue
Gets the next distinct value in the enum, skipping duplicate integer values.
GetNextValue
Gets the next value in the enum, or the first value if the current value is the last one.
GetPreviousValue
Gets the previous value in the enum, or the last value if the current value is the first one.
GetRandomValue
Gets a random value from the enum.
GetUnderlyingType
Gets the underlying type of the enum.
GetValues
Gets an array of all values of the specified enum type.
HasAnyFlag
Determines whether the enum value has any of the specified flags.
HasFlag
Determines whether the enum value has the specified flag.
IsDefined
Determines whether the specified value exists in the enum.
IsDefinedName
Determines whether the specified name exists in the enum.
IsEnumFlagSet
Checks if a specific flag is set in the enum value.
IsEnumValueInRange
Checks if the given integer value is within the range of defined enum values.
IsInRange
Checks if the enum value is within the specified range.
IsValidEnumValue
Checks if the given value is a valid enum value for the specified enum type.
Parse
Parses a string to the specified enum type.
ParseIgnoreCase
Parses a string to the enum value, ignoring case.
ToFriendlyString
Converts the enum value to a friendly string by inserting spaces before capital letters.
ToInt
Converts the enum value to its underlying integer value.
ToList
Converts an enum type to a list of its values.
ToLong
Converts the enum value to its underlying long value.
ToStringFast
Converts the enum value to its string representation using a cached approach for better performance.
ToStringWithSeparator
Converts the enum value to a string with a custom separator between words.
TryParse
Tries to parse a string to the specified enum type.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2024.9.9.1414 | 117 | 9/9/2024 |
2024.9.9.1402 | 123 | 9/9/2024 |
2024.9.9.1338 | 111 | 9/9/2024 |
2024.9.9.1335 | 110 | 9/9/2024 |
2024.9.9.1320 | 111 | 9/9/2024 |
2024.9.9.1225 | 117 | 9/9/2024 |
2024.9.9.1052 | 112 | 9/9/2024 |
2024.9.9.1044 | 115 | 9/9/2024 |