ImanSoftware.Extensions
1.0.4
dotnet add package ImanSoftware.Extensions --version 1.0.4
NuGet\Install-Package ImanSoftware.Extensions -Version 1.0.4
<PackageReference Include="ImanSoftware.Extensions" Version="1.0.4" />
<PackageVersion Include="ImanSoftware.Extensions" Version="1.0.4" />
<PackageReference Include="ImanSoftware.Extensions" />
paket add ImanSoftware.Extensions --version 1.0.4
#r "nuget: ImanSoftware.Extensions, 1.0.4"
#:package ImanSoftware.Extensions@1.0.4
#addin nuget:?package=ImanSoftware.Extensions&version=1.0.4
#tool nuget:?package=ImanSoftware.Extensions&version=1.0.4
ImanSoftware.Extensions
Version: 1.0.1 | Last Updated: August 2026
A lightweight collection of useful .NET extension methods that reduce boilerplate code and simplify everyday development.
ImanSoftware.Extensions provides a rich set of extension methods for the most commonly used .NET types, making your code cleaner, more expressive, and easier to maintain.
Installation
Install the package using the .NET CLI:
dotnet add package ImanSoftware.Extensions
Why ImanSoftware.Extensions?
Every .NET project ends up implementing the same helper methods over and over again.
This package centralizes those common extensions into a single, dependency-free library.
Benefits include:
- Less repetitive code
- Improved readability
- Cleaner APIs
- Consistent helper methods across projects
- Lightweight and easy to use
Features
String Extensions
Useful helpers for working with strings.
Available methods:
ToCamelCase()ToSnakeCase()Truncate()IsEmail()ExtractNumbers()NormalizeWhitespace()IsNullOrWhiteSpace()
Example:
using ImanSoftware.Extensions;
var text = " hello world ";
var normalized = text.NormalizeWhitespace();
// hello world
var camel = text.ToCamelCase();
// helloWorld
var snake = text.ToSnakeCase();
// hello_world
var numbers = "Phone: +1 (234) 567-890".ExtractNumbers();
// 1234567890
DateTime Extensions
Utility methods for working with dates and times.
Available methods:
StartOfDay()EndOfDay()StartOfWeek()Age()IsToday()ToUnixTimestamp()FromUnixTimestamp()
Example:
using ImanSoftware.Extensions;
var now = DateTime.Now;
var start = now.StartOfDay();
var end = now.EndOfDay();
var week = now.StartOfWeek();
var age = birthDate.Age();
bool isToday = now.IsToday();
long unix = now.ToUnixTimestamp();
DateTime date = DateTimeExtensions.FromUnixTimestamp(unix);
Enum Extensions
Additional functionality for enumerations.
Available methods:
GetDescription()GetDisplayName()GetValues()ToInt()Parse()
Example:
var description = OrderStatus.Completed.GetDescription();
int value = OrderStatus.Completed.ToInt();
var status = EnumExtensions.Parse<OrderStatus>("Completed");
Enumerable Extensions
Helpful extensions for collections.
Available methods:
IsNullOrEmpty()DistinctBy()Chunk()ForEach()ToHashSet()
Example:
var users = repository.GetUsers();
if (!users.IsNullOrEmpty())
{
users.ForEach(Console.WriteLine);
}
var unique = users.DistinctBy(x => x.Id);
var groups = users.Chunk(10);
var hashSet = users.ToHashSet();
Object Extensions
General-purpose object helpers.
Available methods:
ToJson()IsNull()ThrowIfNull()DeepCopy()
Example:
var json = user.ToJson();
user.ThrowIfNull();
var clone = user.DeepCopy();
bool isNull = user.IsNull();
Exception Extensions
Utilities for working with exceptions.
Available methods:
GetFullMessage()GetFullStackTrace()Is<T>()GetInnermostException()
Example:
try
{
// Code...
}
catch (Exception ex)
{
Console.WriteLine(ex.GetFullMessage());
Console.WriteLine(ex.GetFullStackTrace());
if (ex.Is<ArgumentException>())
{
// Handle argument exception
}
var inner = ex.GetInnermostException();
}
Example
using ImanSoftware.Extensions;
var name = " hello world ";
var normalized = name.NormalizeWhitespace();
// hello world
var camel = name.ToCamelCase();
// helloWorld
var snake = name.ToSnakeCase();
// hello_world
var date = DateTime.Now;
var startOfWeek = date.StartOfWeek();
var age = birthDate.Age();
long unix = date.ToUnixTimestamp();
Design Goals
- Lightweight
- Dependency-free
- High performance
- Simple API
- Clean and consistent naming
- Everyday developer utilities
- Compatible with modern .NET applications
Requirements
- .NET Standard 2.0+
- .NET 6+
- .NET 7+
- .NET 8+
- .NET 9+
- .NET 10.0+
Author
Iman Estiri
📧 contact.imanestiri@gmail.com
📧 dev.imanestiri@gmail.com
GitHub:
License
This project is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on ImanSoftware.Extensions:
| Package | Downloads |
|---|---|
|
ImanSoftware.RateLimiter
Rate limiting abstraction with in-memory and distributed support. |
|
|
ImanSoftware.Framework
Umbrella package that bundles all ImanSoftware modules for a unified development experience. |
GitHub repositories
This package is not used by any popular GitHub repositories.