CSharpEssentials.Core
3.0.3
See the version list below for details.
dotnet add package CSharpEssentials.Core --version 3.0.3
NuGet\Install-Package CSharpEssentials.Core -Version 3.0.3
<PackageReference Include="CSharpEssentials.Core" Version="3.0.3" />
<PackageVersion Include="CSharpEssentials.Core" Version="3.0.3" />
<PackageReference Include="CSharpEssentials.Core" />
paket add CSharpEssentials.Core --version 3.0.3
#r "nuget: CSharpEssentials.Core, 3.0.3"
#:package CSharpEssentials.Core@3.0.3
#addin nuget:?package=CSharpEssentials.Core&version=3.0.3
#tool nuget:?package=CSharpEssentials.Core&version=3.0.3
CSharpEssentials.Core
Foundational utilities and extensions for everyday .NET development. Zero internal dependencies.
Features
- String Conversions — Pascal, Camel, Snake, Kebab, Macro, Train, Title, UnderscoreCamel.
- Collection Helpers — Conditional add, null filtering, random selection, set comparison.
- Functional Extensions — Null-safe execution (
IfNotNull,IfNull,IfTrue,IfFalse). - Task Helpers —
WithCancellation,AsTask,AsValueTask. - GUID Utilities — URL-safe Base64 encoding, Version 7 GUID generation on .NET 9+.
- Exception Helpers — Flatten inner exceptions and messages.
- HTTP Constants — Common status codes as typed constants.
Installation
dotnet add package CSharpEssentials.Core
Usage
String Case Conversions
using CSharpEssentials.Core;
string text = "helloWorld";
text.ToPascalCase(); // "HelloWorld"
text.ToCamelCase(); // "helloWorld"
text.ToSnakeCase(); // "hello_world"
text.ToKebabCase(); // "hello-world"
text.ToMacroCase(); // "HELLO_WORLD"
text.ToTrainCase(); // "Hello-World"
text.ToTitleCase(); // "Hello World"
text.ToUnderscoreCamelCase(); // "_helloWorld"
Collection Extensions
var list = new List<string> { "a", "b" };
list.IfAdd(true, "c");
list.IfAddRange(true, ["d", "e"]);
list.ForEach(Console.WriteLine);
var filtered = list.WhereIf(true, x => x != "a");
var clean = new List<string?> { "a", null, "b" }.WithoutNulls();
var numbers = new[] { 1, 2, 3 };
numbers.GetRandomItem();
numbers.GetRandomItems(2);
Functional Extensions
object? data = GetData();
if (data.IsNull()) { /* ... */ }
if (data.IsNotNull()) { /* ... */ }
data.IfNotNull(d => Process(d));
data.IfNull(() => Initialize());
true.IfTrue(() => Console.WriteLine("yes"));
false.IfFalse(() => Console.WriteLine("no"));
Task Helpers
await SomeTask().WithCancellation(cts.Token);
string value = "hello";
Task<string> task = value.AsTask();
ValueTask<string> vt = value.AsValueTask();
GUID Utilities
Guid id = Guider.NewGuid(); // Version 7 on .NET 9+
string shortId = id.ToStringFromGuid(); // URL-safe Base64 (22 chars)
Guid parsed = shortId.ToGuidFromString();
Exception Helpers
try { /* ... */ }
catch (Exception ex)
{
var innerExceptions = ex.GetInnerExceptions();
var messages = ex.GetInnerExceptionsMessages();
}
HTTP Status Codes
int ok = HttpCodes.Ok;
int notFound = HttpCodes.NotFound;
int badRequest = HttpCodes.BadRequest;
| Product | Versions 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. |
-
.NETStandard 2.0
- System.Memory (>= 4.5.5)
- System.Threading.Tasks.Extensions (>= 4.5.4)
-
.NETStandard 2.1
- No dependencies.
-
net10.0
- No dependencies.
-
net11.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on CSharpEssentials.Core:
| 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.GcpSecretManager
A powerful .NET configuration provider for Google Cloud Secret Manager that enables seamless secret management in your applications. Features include region-specific secret handling, flexible filtering options, batch processing, automatic secret rotation, built-in retry policies, and JSON value flattening support. Perfect for cloud-native applications requiring secure and scalable secret management. |
|
|
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. |
|
|
CSharpEssentials.Rules
Business rules engine for domain-driven design in C#. Provides rule validation, business logic enforcement, and domain rule composition patterns. Essential for implementing complex business rules in a maintainable way. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.4 | 4 | 5/6/2026 |
| 3.0.3 | 89 | 5/5/2026 |
| 3.0.2 | 182 | 5/5/2026 |
| 3.0.1 | 262 | 5/3/2026 |
| 3.0.0 | 264 | 5/3/2026 |
| 2.1.0 | 369 | 11/26/2025 |
| 2.0.9 | 329 | 9/30/2025 |
| 2.0.8 | 322 | 9/29/2025 |
| 2.0.7 | 308 | 9/29/2025 |
| 2.0.6 | 304 | 9/29/2025 |
| 2.0.5 | 311 | 9/29/2025 |
| 2.0.4 | 317 | 9/28/2025 |
| 2.0.3 | 312 | 9/28/2025 |
| 2.0.2 | 316 | 9/28/2025 |
| 2.0.1 | 303 | 9/28/2025 |
| 2.0.0 | 323 | 9/28/2025 |