Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Core
  3. Enums.NET

Enums.NET

MITC#5.0.0

A high-performance, type-safe .NET utility library for enum operations, solving limitations of System.Enum.

GitHubGitHub
1.8k stars104 forks0 contributors

What is Enums.NET?

Enums.NET is a utility library for .NET that provides high-performance, type-safe operations for enums. It solves common pain points with `System.Enum`, such as inefficient flag handling, reflection overhead, and cumbersome attribute retrieval, offering extension methods for tasks like validation, formatting, and parsing.

Target Audience

.NET developers working extensively with enums, especially those needing efficient flag operations, custom attribute integration, or performance-critical enum handling in applications.

Value Proposition

Developers choose Enums.NET for its significant performance gains over `System.Enum`, type-safe API, and comprehensive feature set—including advanced flag operations, custom validation, and seamless attribute support—without the boilerplate of manual reflection.

Overview

Enums.NET is a high-performance type-safe .NET enum utility library

Use Cases

Best For

  • Implementing complex flag enum operations with type safety
  • Improving performance in enum-heavy .NET applications
  • Associating and retrieving custom metadata (attributes) with enum values
  • Validating enum values, including custom flag combinations
  • Parsing and formatting enums with custom symbols or descriptions
  • Replacing or extending System.Enum functionality in legacy codebases

Not Ideal For

  • Projects targeting .NET frameworks older than 4.6.1 or .NET Standard versions below 2.0
  • Applications with minimal enum usage where System.Enum's basic methods suffice
  • Teams prioritizing zero external dependencies for core .NET functionality
  • Scenarios where enum operations are not performance-critical and reflection overhead is acceptable

Pros & Cons

Pros

High-Performance Operations

Utilizes caching and efficient algorithms to avoid reflection overhead, making operations significantly faster than System.Enum, as shown in the provided performance benchmarks.

Type-Safe Flag Handling

Provides methods like HasAllFlags and HasAnyFlags for precise, unambiguous flag manipulation, addressing the inefficiencies and ambiguity of System.Enum.HasFlag.

Seamless Attribute Integration

Simplifies retrieval of custom attributes (e.g., DescriptionAttribute) on enum members without manual reflection, as demonstrated in the demo with SymbolAttribute and PrimaryEnumMemberAttribute.

Comprehensive Validation Support

Offers built-in validation for standard and flag enums, plus extensible custom validation via IEnumValidatorAttribute, allowing for complex rule enforcement like in the DayTypeValidator example.

Cons

Breaking Version Changes

Major updates like v5.0 and v4.0 removed features (e.g., Boolean enum support) and dropped support for older .NET targets, requiring code migration and potentially causing upgrade friction.

Dependency Management Overhead

For certain targets, it adds dependencies like System.Runtime.CompilerServices.Unsafe, which can complicate maintenance and introduce compatibility issues in tightly controlled environments.

Learning Curve for Advanced Features

Features such as custom enum formats and validators require understanding of extension methods and attribute patterns, which might be complex for developers new to advanced enum usage.

Frequently Asked Questions

Quick Stats

Stars1,832
Forks104
Contributors0
Open Issues2
Last commit8 months ago
CreatedSince 2015

Tags

#parsing#high-performance#validation#csharp#enum#dotnet#dotnet-core#type-safe#reflection#attributes

Built With

.
.NET Framework 4.6.1+
.
.NET Standard 2.0

Included in

.NET21.2kCore21.2k
Auto-fetched 1 day ago

Related Projects

PollyPolly

Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.

Stars14,185
Forks1,272
Last commit1 day ago
AutoMapperAutoMapper

A convention-based object-object mapper in .NET.

Stars10,191
Forks2,409
Last commit23 days ago
HumanizerHumanizer

Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities

Stars9,666
Forks1,052
Last commit19 days ago
AngleSharpAngleSharp

:angel: The ultimate angle brackets parser library parsing HTML5, MathML, SVG and CSS to construct a DOM based on the official W3C specifications.

Stars5,499
Forks591
Last commit2 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub