I do not think there is an equivalent of two arguments to the form of the VB Weekday function.
You can imitate this using something like this:
private static int Weekday(DateTime date, DayOfWeek startDay) { int diff; DayOfWeek dow = date.DayOfWeek; diff = dow - startDay; if (diff < 0) { diff += 7; } return diff; }
Then let's call it like this:
int i = Weekday(DateTime.Now, DayOfWeek.Friday);
He returns 4 for today, since Tuesday is 4 days after Friday.
Powerlord
source share