K
Kevin
Hi everybody.
I am new to C#, I come from a VB 6 background, so there are some pretty big
difference that I need to get used to, so please bear with me if my
questions are simple.
1. In my C# application, I use a monthCalendar. What I basically want is
when I click a day in the week, it must highlight that whole week for me
automatically. Now I managed to get to pass the date that was selected by
the user, but what I want to do is determine the date of the first day in
that week. i.e. if I select the 06/11/2003(Thursday), and my first day of
the week is Monday, then I want my method to figure out the date of Monday
and set the monthCalendars start and end date from Mondays date - Sundays
date. I do not know how to do this. I see that the DateTime class has
AddDays,AddMonths etc, but I do not see anything for SubtractDays or
SubtractMonths etc. I do see that there is a Subtract method, but I can only
get it to work if I already know what Mondays date is! Any help would be
SOOOO appreciated.
2. I know that in VB6, if I ran my app, and there was an error in the code,
I could pause the app, fix the problem, or even add in extra lines of code,
and carry on executing, however in my C# app, when there is a problem, or I
come to a breakpoint, and I want to change something, or add new lines of
code, it asks me whether I want to restart, or continue, If I restart, the
app closes down and is re-run, if I choose continue, the app carries on, but
ignores my changes or additions. Am I doing something wrong? Why do I need
to restart the whole app for my changes to take effect. Again, any info is
greatly appreciated
TIA for your help
Kevin
I am new to C#, I come from a VB 6 background, so there are some pretty big
difference that I need to get used to, so please bear with me if my
questions are simple.
1. In my C# application, I use a monthCalendar. What I basically want is
when I click a day in the week, it must highlight that whole week for me
automatically. Now I managed to get to pass the date that was selected by
the user, but what I want to do is determine the date of the first day in
that week. i.e. if I select the 06/11/2003(Thursday), and my first day of
the week is Monday, then I want my method to figure out the date of Monday
and set the monthCalendars start and end date from Mondays date - Sundays
date. I do not know how to do this. I see that the DateTime class has
AddDays,AddMonths etc, but I do not see anything for SubtractDays or
SubtractMonths etc. I do see that there is a Subtract method, but I can only
get it to work if I already know what Mondays date is! Any help would be
SOOOO appreciated.
2. I know that in VB6, if I ran my app, and there was an error in the code,
I could pause the app, fix the problem, or even add in extra lines of code,
and carry on executing, however in my C# app, when there is a problem, or I
come to a breakpoint, and I want to change something, or add new lines of
code, it asks me whether I want to restart, or continue, If I restart, the
app closes down and is re-run, if I choose continue, the app carries on, but
ignores my changes or additions. Am I doing something wrong? Why do I need
to restart the whole app for my changes to take effect. Again, any info is
greatly appreciated
TIA for your help
Kevin