yeah but its confusing and is too close to an an indexermabster wrote:Yeah, I was hoping for extension properties too:
public static TimeSpan Minutes[this int i]
{
get { return new TimeSpan(0, i, 0); }
}
public static DateTime Ago[this TimeSpan ts]
{
get { return DateTime.Now.Subtract(ts); }
}
So then I could do:
DateTime d = 20.Minutes.Ago;
No ugly parentheses!