Click here to Skip to main content
15,845,598 members
Home / Discussions / C#
   

C#

 
GeneralOpen letter to mister Prakash Pin
Bradml2-May-07 3:21
Bradml2-May-07 3:21 
GeneralRe: Open letter to mister Prakash Pin
Colin Angus Mackay2-May-07 5:19
Colin Angus Mackay2-May-07 5:19 
GeneralRe: Open letter to mister Prakash Pin
Dave Kreskowiak2-May-07 5:55
mveDave Kreskowiak2-May-07 5:55 
QuestionCounting the Number of Working Days Pin
zoroyster2-May-07 2:19
zoroyster2-May-07 2:19 
AnswerRe: Counting the Number of Working Days Pin
CPallini2-May-07 3:02
mveCPallini2-May-07 3:02 
GeneralRe: Counting the Number of Working Days Pin
zoroyster2-May-07 15:05
zoroyster2-May-07 15:05 
AnswerRe: Counting the Number of Working Days Pin
PIEBALDconsult3-May-07 7:02
mvePIEBALDconsult3-May-07 7:02 
AnswerRe: Counting the Number of Working Days Pin
AFSEKI7-May-07 7:52
AFSEKI7-May-07 7:52 
public static int GetWorkingDatesBetween(DtaeTime DateFrom, DateTime DateTo)
{

if(DateFrom.CompareTo(DateTo) >= 0 )
throw new ArgumentException("Invalid date ranges! DateTo should be greater than DateFrom");

int totalWorkingDaysElapsed = 0;

while(DateFrom.CompareTo(DateTo) != 0)
{
DateFrom = DateFrom.AddDays(1);

if(DateFrom.DayOfWeek == DawOfWeek.Saturday || DateFrom.DayOfWeek == DawOfWeek.Sunday)
continue;

++totalWorkingDaysElapsed;
}

retrun totalWorkinDaysElapsed;
}

Hope this helps...
QuestionTCP/IP & UDP Pin
Prakash A 19802-May-07 1:39
Prakash A 19802-May-07 1:39 
AnswerRe: TCP/IP & UDP Pin
Guffa2-May-07 2:02
Guffa2-May-07 2:02 
AnswerRe: TCP/IP & UDP Pin
Christian Graus2-May-07 2:05
protectorChristian Graus2-May-07 2:05 
AnswerRe: TCP/IP & UDP Pin
Eytukan2-May-07 3:14
Eytukan2-May-07 3:14 
QuestionPrinting Drawing Shapes Pin
free_soul4242-May-07 1:36
free_soul4242-May-07 1:36 
AnswerRe: Printing Drawing Shapes Pin
Bijesh2-May-07 3:23
Bijesh2-May-07 3:23 
QuestionTCP/IP & UDP Pin
Prakash A 19802-May-07 1:16
Prakash A 19802-May-07 1:16 
AnswerRe: TCP/IP & UDP Pin
Muammar©2-May-07 1:27
Muammar©2-May-07 1:27 
Questionproblem in grouping of radio buttons in C#.net 205 Pin
pashitech2-May-07 1:06
pashitech2-May-07 1:06 
AnswerRe: problem in grouping of radio buttons in C#.net 205 Pin
Giorgi Dalakishvili2-May-07 1:07
mentorGiorgi Dalakishvili2-May-07 1:07 
GeneralRe: problem in grouping of radio buttons in C#.net 205 Pin
pashitech2-May-07 1:19
pashitech2-May-07 1:19 
QuestionVOIP Client in C# Pin
Waskira2-May-07 0:52
Waskira2-May-07 0:52 
AnswerRe: VOIP Client in C# Pin
Rahul Babu2-May-07 3:33
Rahul Babu2-May-07 3:33 
GeneralRe: VOIP Client in C# Pin
Waskira2-May-07 21:18
Waskira2-May-07 21:18 
QuestionFiltering datasets Pin
Muammar©2-May-07 0:52
Muammar©2-May-07 0:52 
AnswerRe: Filtering datasets Pin
Pete O'Hanlon2-May-07 0:58
subeditorPete O'Hanlon2-May-07 0:58 
GeneralRe: Filtering datasets Pin
Muammar©2-May-07 1:15
Muammar©2-May-07 1:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.