Open source · .NET 8 & .NET Framework

Stop rewriting the same C# boilerplate

Extension methods, utilities, and a runtime feature-flag engine — so your team ships business logic, not plumbing.

$ dotnet add package PowerCSharp.Core

13

packages on NuGet

MIT

licensed, open source

net8.0

+ .NET Framework 4.6.2–4.8

5-tier

flag resolution precedence

Core & Extensions

Over 100 extension methods you'd otherwise write yourself

Strings, collections, DateTime, dynamic LINQ, JSON/XML, and secure path handling — plus validation, crypto, and environment helpers with zero third-party dependencies.

Explore the Core bundle
StringExtensions.cs
using PowerCSharp.Extensions;

string text = "hello world";
bool isEmpty = text.IsNullOrWhiteSpace();  // false
string title = text.ToTitleCase();         // "Hello World"
string safe  = text.SafeSubstring(0, 5);   // "hello"
Features engine

Toggle capabilities without redeploying

A composite flag resolver checks code overrides, a custom provider, environment variables, appsettings, and a default — in that order — so every feature in the ecosystem resolves flags the same way.

See how the engine works
Program.cs
builder.Services.AddPowerFeatures(builder.Configuration, options =>
{
    options.AddBuiltInFeatures();
    options.ScanAssemblies(typeof(CacheFeatureModule).Assembly);
    options.EnableDiagnosticsEndpoint(); // GET /power-features
});

app.UsePowerFeatures();

Flag precedence, highest first

Code override

options.Override(key, value)

Custom provider

IFeatureFlagProvider

Environment variable

POWERFEATURES__KEY__ENABLED

appsettings.json

PowerFeatures:Key:Enabled

Feature default

DefaultEnabled

Feature.Cache

One cache contract, two swappable backends

Application code calls the same ICacheService whether the active provider is an in-memory LRU cache or a disk-backed cache that survives restarts — switching providers is a config change, not a code change.

Compare BitFaster vs. Disk

BitFaster

In-memory LRU

  • Bound by process RAM, W-TinyLFU eviction
  • Lock-free concurrent reads
  • Atomic GetOrAdd — true stampede protection

Disk

Cross-process LRU

  • Zero third-party NuGet dependencies
  • Atomic write-then-rename, per-key file locks
  • Survives process restarts and host reboots

Add it to your next .NET project

Six independently-versioned packages in the core bundle alone — install only what your project needs.

dotnet add package PowerCSharp.Core