Skip to content

companova/CommonExtensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status:

master dev
Build Status Build Status

.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
}

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages