ExtensionMethod.NET is a database of C# 3.0, F# and Visual Basic 2008 extension methods. It contains many user-rated extension methods that will expand your code library immediately.

Over 100 Extension Methods

Extension methods add functionality to existing classes and allow you to expand the .NET framework. This way your favorite functions integrate seamlessly into the framework. For more information about extension methods visit the C# 3.0 and Visual Basic 2008 MSDN Library pages.

We invite you to submit your favorite extension methods and download and use others.

We need your feedback about this website. We've noticed some user comments regarding redundant or untested extension methods. We're working on a voting system that allows to dispose extension methods. If you have more feedback, email it to us

TOP 3 Extension Methods

OrderBy(string sortExpression)  Submitted by C.F.Meijers on 2008-4-25 Orders a list based on a sortexpression. Useful in object databinding scenarios where the objectdatasource generates a dynamic sortexpression (example: "Name desc") that specifies the property of the object sort on.Language C# Type System.Collections.Generic.IEnumerable<T> Downloads 997
Pivot  Submitted by Fons Sonnemans on 2009-1-21 Groups the elements of a sequence according to a specified firstKey selector function and rotates the unique values from the secondKey selector function into multiple values in the output, and performs aggregations. Language C# Type System.Collections.Generic.IEnumerable<T> Downloads 816
Encrypt & Decrypt  Submitted by Mark de Rover on 2008-1-02 Encrypt and decrypt a string using the RSACryptoServiceProvider.Language C# Type System.String Downloads 753

Recently added

Select  Submitted by Credit goes to Jon Skeet on 2012-5-07 It returns reader lines which can be retrieved from lamba statementLanguage C# Type System.Data.SqlClient.SqlDataReader Downloads 1
IsNullOrEmptyOrWhiteSpace  Submitted by Omkar Panhalkar on 2012-5-07 It returns true if string is null or empty or just a white space otherwise it returns false.Language C# Type System.String Downloads 0
DoesNotEndWith  Submitted by Omkar Panhalkar on 2012-5-07 It returns true if string does not end with the character otherwise returns false. If you pass null or empty string, false will be returned.Language C# Type System.String Downloads 0
DoesNotStartWith  Submitted by Omkar Panhalkar on 2012-5-07 It returns true if string does not start with the character otherwise returns false if you pass null or empty string, false will be returned.Language C# Type System.String Downloads 0
IsNotNullOrEmpty  Submitted by Omkar Panhalkar on 2012-5-07 It returns false if given collection is null or empty otherwise it returns true.Language C# Type System.Collections.Generic.IEnumerable<T> Downloads 1
DeepClone  Submitted by Omkar Panhalkar on 2012-5-07 It returns deep copy of the object.Language C# Type System.Type Downloads 1
IsNotNull  Submitted by Omkar Panhalkar on 2012-5-07 This method returns true if the value if not null otherwise it returns false.Language C# Type System.Type Downloads 0
IsNull  Submitted by Omkar Panhalkar on 2012-5-07 This method returns true if the value is null otherwise it returns falseLanguage C# Type System.Type Downloads 1
Each  Submitted by Ricardo Amores Hernández on 2012-5-03 Iterates over all the elements in a collection and performs the given action, usually given as a lambda.Language C# Type System.IEnumerable<T> Downloads 2
CacheGeneratedResults  Submitted by Andrew Arnott on 2012-4-30 Caches the results of generator methods so that expensive enumerations are not repeated if they are enumerated multiple times. Yet it caches the results lazily, allowing for memory efficiency where possible.Language C# Type System.Collections.Generic.IEnumerable<T> Downloads 2