CSharpEssentials.Enums 3.0.5

dotnet add package CSharpEssentials.Enums --version 3.0.5
                    
NuGet\Install-Package CSharpEssentials.Enums -Version 3.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CSharpEssentials.Enums" Version="3.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CSharpEssentials.Enums" Version="3.0.5" />
                    
Directory.Packages.props
<PackageReference Include="CSharpEssentials.Enums" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CSharpEssentials.Enums --version 3.0.5
                    
#r "nuget: CSharpEssentials.Enums, 3.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CSharpEssentials.Enums@3.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CSharpEssentials.Enums&version=3.0.5
                    
Install as a Cake Addin
#tool nuget:?package=CSharpEssentials.Enums&version=3.0.5
                    
Install as a Cake Tool

CSharpEssentials.Enums

Source generator for fast, compile-time enum operations. Mark enums with [StringEnum] and get optimized extension methods generated automatically.

Features

  • StringEnumAttribute — Marker to opt enums into source generation.
  • Source Generator — Compile-time optimized ToString, parsing, and formatting with zero reflection.

Installation

dotnet add package CSharpEssentials.Enums

Usage

Mark Your Enum

using CSharpEssentials.Enums;

[StringEnum]
public enum UserStatus
{
    Active,
    Inactive,
    Suspended
}

Generated Extensions

UserStatus s = UserStatus.Active;

s.ToOptimizedString();      // "Active"
s.ToSnakeCase();            // "active"
s.ToKebabCase();            // "active"
s.ToLowerCase();            // "active"
s.ToUpperCase();            // "ACTIVE"
s.AsUnderlyingType();       // 0

// Constants
UserStatusExtensions.ActiveSnakeCase;    // "active"
UserStatusExtensions.ActiveKebabCase;    // "active"

// Lookup
UserStatusExtensions.IsDefined("Active");              // true
UserStatusExtensions.TryParse("Inactive", out var v);  // true, v = Inactive
UserStatusExtensions.Parse("Suspended");               // UserStatus.Suspended

// Metadata
UserStatusExtensions.GetNames();   // ["Active", "Inactive", "Suspended"]
UserStatusExtensions.GetValues();  // [Active, Inactive, Suspended]

Integration

CSharpEssentials.Json and CSharpEssentials.EntityFrameworkCore recognize [StringEnum] to automatically serialize enums as strings.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net10.0

    • No dependencies.
  • net11.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on CSharpEssentials.Enums:

Package Downloads
CSharpEssentials

A comprehensive C# library enhancing functional programming capabilities with type-safe monads (Maybe, Result), discriminated unions (Any), and robust error handling. Features include: domain-driven design support, enhanced Entity Framework integration, testable time management, JSON utilities, and LINQ extensions. Built for modern C# development with focus on maintainability, testability, and functional programming principles.

CSharpEssentials.EntityFrameworkCore

Enhances Entity Framework Core with functional programming patterns and DDD-friendly features. Includes base entity classes, soft delete support, audit trails, query filters, optimistic concurrency, PostgreSQL integration, query performance monitoring, and domain event handling. Perfect for building maintainable and scalable data access layers in modern .NET applications.

CSharpEssentials.Json

JSON utilities and custom converters for System.Text.Json in C#. Includes MultiFormatDateTimeConverter, ConditionalStringEnumConverter, PolymorphicJsonConverterFactory, and JsonOptions. Essential for advanced JSON serialization scenarios.

CSharpEssentials.Errors

Comprehensive error handling system for functional programming in C#. Provides Error types, ErrorMetadata, ErrorType enums, and extensions for robust error management. Foundation for Result pattern and functional error handling.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.5 454 5/7/2026
3.0.4 430 5/6/2026
3.0.3 440 5/5/2026
3.0.2 430 5/5/2026
3.0.1 429 5/3/2026
3.0.0 413 5/3/2026
2.1.0 431 11/26/2025
2.0.9 347 9/30/2025
2.0.8 343 9/29/2025
2.0.7 341 9/29/2025
2.0.6 343 9/29/2025
2.0.5 327 9/29/2025
2.0.4 347 9/28/2025
2.0.3 342 9/28/2025
2.0.2 360 9/28/2025
2.0.1 345 9/28/2025
2.0.0 347 9/28/2025