Project DescriptiondotNetExt is a Extension Method Library for the .NET Framework that extends the BCL Types with helper methods that make simple tasks simpler. So far there are extensions for the Object, IEnumerable<> and String BCL Types. The library is flexible so you can Import All Extension Methods or just the Extension Methods for the BCL Type(s) you want.
Library Usage
You can include the entire library of Extension Methods by Importing the dotNetExt namespace. Alternatively you can Import just the Extension Methods you want (grouped by Base Class Library Type) by including that specific extension collections namespace.
// Include All Extension Methods
using dotNetExt;
Extension Methods
dotNetExt namespace
Importing this namespace you will import all the Extension Methods from the below namespaces.
dotNetExt.Array namespace
This namespace includes Extension Methods for the System.Array Type only.
- IsEmpty() - Returns a Boolean indicating whether the Array is Empty (is Null or has a length of zero).
dotNetExt.Object namespace
This namespace includes Extension Methods for the System.Object Type only.
- IsType() - Returns a Boolean value indicating whether a variable is of the indicated Type
- IsArray() - Returns a Boolean value indicating whether a variable points to a System.Array.
- IsDate() - Returns a Boolean value indicating whether a variable points to a DateTime object.
- IsDBNull() - Returns a Boolean value indicating whether an expression evaluates to the DBNull class.
dotNetExt.String namespace
This namespace includes Extension Methods for the System.String Type only.
- Left() - Returns a string containing a specified number of characters from the left side of a string.
- Right() - Returns a string containing a specified number of characters from the right side of a string.
- EncodeHtml() - Returns the String HtmlEncoded.
- DecodeHtml() - Returns the String HtmlDecoded.
- EncodeUrl() - Returns the String UrlEncoded.
- DecodeUrl() - Returns the String UrlDecoded.
- EncodeBase64() - Returns the String Base64 Encoded.
- DecodeBase64() - Returns the String Base64 Decoded.
- ToByteArray() - Returns a Byte Array of the String.