I can have an extension method like this:
DateTime d = new DateTime();
d = d.GetRandomDate();
GetRandomDate is my extension method. However the above doesn't make much sense. What would be better is:
DateTime d = DateTime.GetRandomDate();
However, I don't know how to do this. An extension method created as:
public static DateTime GetRandomDate(this System.DateTime dt)
will only add the GetRandomDate() in the first example above, not the second one. Is there a way to achieve the desired behaviour?