Release notes:
Added Support for net8.0 and net9.0
.NET Common Extensions
A collection of simple but useful extensions to .NET basic objects
Setup:
Available on NuGet: Companova.Common.Extensions
Example IsNullOrEmpty();
IsNullOrEmpty();Replaces a common practice to check whether a List or Array is null or empty.
void foo(List<T> listOfTs)
{
// Use the extension to check whether the List is null or empty.
// Instead of this:
if(listOfTs == null || listOfTs.Count == 0)
return;
// Use this:
if(listOfTs.IsNullOrEmpty())
return;
// There is some data in the List. Continue on
}Example Shuffle();
Shuffle();Randomly Shuffles an Array:
{
int[] arr = new int[100];
for(int i = 0; i < arr.Length; i++)
{
arr[i] = i;
}
arr.Shuffle();
}What's Changed
- Added Support for net8.0 and net9.0 by @dmitrymal in #7
Full Changelog: 1.0.1...1.0.2