I have a C# method like this:
public static int DaysLeft(DateTime startDate, DateTime endDate, Boolean excludeWeekends, String excludeDates)
{
}
Here's pseudocode for a different approach which I've used in SQL:
Find the total number of days between the two dates
Subtract number of weekends
Remove a day if the start date is a sunday
Remove a day if the start date is a saturday
Remove any other days you don't want (see my comment above for how to do this in c#)