Sunday, February 10, 2008

Static Extension Methods

DateTime d = DateTime.Yesterday();
//...
public static DateTime Yesterday<this DateTime>()
{
return DateTime.Today.AddDays(-1);
}
 


Via Mabstrerama

No comments: