Hi
Another new language feature of the C# 3.0 is the extension method. This feature will also be available on the next version of the VB.Net. Extension methods allow developer to add new methods to a public contract of an existing CLR type without sub classing the type.
Extension Methods help blend the flexibility of "duck typing" support popular within dynamic languages today with the performance and compile-time validation of strongly typed languages.
A simple example of the Extension method would be to add some validation to the string class. Lets say when we want to validate that a string is a valid Email or not we normally use another class with a static method to validate it. The typical example would be
string email = Request.QueryString["email"];
if ( EmailValidator.IsValid(email) ) { }