Monday, April 7, 2008

Write Extension methods

Extension Methods: allow us to add new methods to existing CLR type.

simple example:

string customerName ="you foo";
if(Customer.IsValid(customerName))
{}


now by adding extending methods
string customerName = "you foo";

if(custimerName.IsValid())
{}

No comments: