Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
QuestionDevexpress gridview conditional row color based on value Pin
Member 106494956-Apr-14 11:52
Member 106494956-Apr-14 11:52 
QuestionFrom project to other project in one solution Pin
Member 97331316-Apr-14 3:55
Member 97331316-Apr-14 3:55 
AnswerRe: From project to other project in one solution Pin
Peter Leow6-Apr-14 4:50
professionalPeter Leow6-Apr-14 4:50 
GeneralRe: From project to other project in one solution Pin
Member 97331318-Apr-14 4:02
Member 97331318-Apr-14 4:02 
Questionhow to show ip address client to listview when client connected and shutdown,wakeup client using c# windows forms. Thanks Pin
Member 107057405-Apr-14 22:02
Member 107057405-Apr-14 22:02 
QuestionRe: how to show ip address client to listview when client connected and shutdown,wakeup client using c# windows forms. Thanks Pin
Richard MacCutchan6-Apr-14 1:40
mveRichard MacCutchan6-Apr-14 1:40 
QuestionRoles in c# Winforms Pin
meloukoud5-Apr-14 7:42
meloukoud5-Apr-14 7:42 
QuestionThe dates of the next week and the previous week days Pin
ismail204-Apr-14 21:28
ismail204-Apr-14 21:28 
I apologize for my bad english (google translate),


With this code, I can see the dates for this week : but I do not see next week and the previous week, please help

DateTime dt = DateTime.Now;

int a = (int)dt.DayOfWeek;

if (a == 0) a = 7;

DateTime monday_day = dt.AddDays(1 - a);
DateTime tuesday_day = dt.AddDays(2 - a);
DateTime wednesday_day = dt.AddDays(3 - a);
DateTime thursday_day = dt.AddDays(4 - a);
DateTime friday_day = dt.AddDays(5 - a);
DateTime saturday_day = dt.AddDays(6 - a);
DateTime sunday_day = dt.AddDays(6);

monday_lbl.Text = monday_day.ToShortDateString();
tuesday_lbl.Text = tuesday_day.ToShortDateString();
wednesday_lbl.Text = wednesday_day.ToShortDateString();
thursday_lbl.Text = thursday_day.ToShortDateString();
friday_lbl.Text = friday_day.ToShortDateString();
saturday_lbl.Text = saturday_day.ToShortDateString();
sunday_lbl.Text = sunday_day.ToShortDateString();

----------------------
AnswerRe: The dates of the next week and the previous week days Pin
OriginalGriff4-Apr-14 22:16
mveOriginalGriff4-Apr-14 22:16 
GeneralRe: The dates of the next week and the previous week days Pin
ismail204-Apr-14 23:29
ismail204-Apr-14 23:29 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff4-Apr-14 23:35
mveOriginalGriff4-Apr-14 23:35 
GeneralRe: The dates of the next week and the previous week days Pin
ismail204-Apr-14 23:48
ismail204-Apr-14 23:48 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 0:27
mveOriginalGriff5-Apr-14 0:27 
GeneralRe: The dates of the next week and the previous week days Pin
ismail205-Apr-14 0:55
ismail205-Apr-14 0:55 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 3:34
mveOriginalGriff5-Apr-14 3:34 
GeneralRe: The dates of the next week and the previous week days Pin
ismail205-Apr-14 4:27
ismail205-Apr-14 4:27 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 4:35
mveOriginalGriff5-Apr-14 4:35 
GeneralRe: The dates of the next week and the previous week days Pin
ismail205-Apr-14 4:43
ismail205-Apr-14 4:43 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 4:49
mveOriginalGriff5-Apr-14 4:49 
GeneralRe: The dates of the next week and the previous week days Pin
ismail205-Apr-14 4:52
ismail205-Apr-14 4:52 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 5:13
mveOriginalGriff5-Apr-14 5:13 
GeneralRe: The dates of the next week and the previous week days Pin
ismail205-Apr-14 5:27
ismail205-Apr-14 5:27 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 5:42
mveOriginalGriff5-Apr-14 5:42 
GeneralRe: The dates of the next week and the previous week days Pin
ismail205-Apr-14 5:47
ismail205-Apr-14 5:47 
GeneralRe: The dates of the next week and the previous week days Pin
OriginalGriff5-Apr-14 6:12
mveOriginalGriff5-Apr-14 6:12 

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.