I have a method which passes two parameters Month and year
i will call this Method like this : MonthDates(January,2010)
public static string MonthDa
instead of string try to declare an enum like the following
public enum Month
{
January = 1,
February,
March,
.... so on
}
then pass it to the function of yours and use the followings in your function
return System.DateTime.DaysInMonth(year, month);
Instead of string try to use integer, as it will reduce the overhead of parsing strings.