Skip to content

Release 1.0.1

Latest
Compare
Choose a tag to compare
@dmitrymal dmitrymal released this 12 Jan 17:08
c7555ea

.NET Common Extensions

A collection of simple but useful extensions to .NET basic objects

Setup:

Nuget

Available on NuGet: Companova.Common.Extensions

Example:

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
}