All-purpose utilities for commonly used assemblies.
- You must have Visual Studio 2019 Community or higher.
- The dotnet cli is also highly recommended.
This project contains heaps of extension methods for common types such as int
and string
.
- Run dotnet restore
- Run dotnet build
- Run dotnet test
Use the package manager NuGet to install Dime.Utilities:
dotnet add package Dime.Utilities
using System;
public void Main(params string[] args)
{
string truncatedString = "Hello world".Truncate(7); // Returns "Hello w";
List<int> someList = new List<int> { 1,2,3,4,5 };
someList.AddIf(10, x => x > 0); // Adds to the list
someList.AddIf(-10, x => x > 0); // Doesn't add to the list
}
Pull requests are welcome. Please check out the contribution and code of conduct guidelines.