GetDate
Return the current date and time
Source
public static class ExtensionMethod
{
public static DateTime GetCurrentDate(this object source)
{
return DateTime.Now;
}
}
Example
object anything = new object();
DateTime date = anything.GetCurrentDate();