Click here to Skip to main content
15,847,653 members
Home / Discussions / C#
   

C#

 
GeneralRe: Playing Mp3 file? Pin
thomasa6-Jan-04 5:38
thomasa6-Jan-04 5:38 
Generaldays of week Pin
mnaveed6-Jan-04 2:16
mnaveed6-Jan-04 2:16 
GeneralRe: days of week Pin
Mazdak6-Jan-04 2:39
Mazdak6-Jan-04 2:39 
GeneralRe: days of week Pin
mnaveed6-Jan-04 3:21
mnaveed6-Jan-04 3:21 
GeneralRe: days of week Pin
Mazdak6-Jan-04 3:28
Mazdak6-Jan-04 3:28 
GeneralRe: days of week Pin
Heath Stewart6-Jan-04 3:30
protectorHeath Stewart6-Jan-04 3:30 
GeneralRe: days of week Pin
mnaveed6-Jan-04 4:55
mnaveed6-Jan-04 4:55 
GeneralRe: days of week Pin
Heath Stewart6-Jan-04 6:03
protectorHeath Stewart6-Jan-04 6:03 
First of all, Tuesday, January 6th, 2004 is not the 2nd day of the week in the en-US culture - nor in many other cultures - it is the 3rd. This all comes down to culture-specific information. Use the following to get what the day of week is for the specific culture:
CultureInfo culture = Thread.CurrentCulture;
int dayOfWeek = (int)culture.Calendar.GetDayOfWeek(DateTime.Now);
An enum like DayOfWeek can be cast to an int. In this case, the DayOfWeek members correspond to the number for the week, i.e. Sunday = 0, Monday = 1, Tuesday = 2, etc. You should add 1 to this value since most people think in base 1, not base 0.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: days of week Pin
mnaveed6-Jan-04 6:52
mnaveed6-Jan-04 6:52 
GeneralCreating CSV files Pin
MrEyes6-Jan-04 1:16
MrEyes6-Jan-04 1:16 
GeneralRe: Creating CSV files Pin
Heath Stewart6-Jan-04 5:26
protectorHeath Stewart6-Jan-04 5:26 
Generalreading from DB Pin
hadi20sa5-Jan-04 23:37
hadi20sa5-Jan-04 23:37 
GeneralRe: reading from DB Pin
Mazdak6-Jan-04 1:35
Mazdak6-Jan-04 1:35 
GeneralRe: reading from DB Pin
Anonymous7-Jan-04 0:18
Anonymous7-Jan-04 0:18 
Questiongetting intercept point of lines?? Pin
azusakt5-Jan-04 23:25
azusakt5-Jan-04 23:25 
AnswerRe: getting intercept point of lines?? Pin
Xiangyang Liu 刘向阳6-Jan-04 0:51
Xiangyang Liu 刘向阳6-Jan-04 0:51 
Questionhow to change dos prompt caption! Pin
yu-yu5-Jan-04 22:12
yu-yu5-Jan-04 22:12 
AnswerRe: how to change dos prompt caption! Pin
Philip Fitzsimons6-Jan-04 3:54
Philip Fitzsimons6-Jan-04 3:54 
AnswerRe: how to change dos prompt caption! Pin
Heath Stewart6-Jan-04 4:16
protectorHeath Stewart6-Jan-04 4:16 
GeneralRe: how to change dos prompt caption! Pin
Xiangyang Liu 刘向阳6-Jan-04 4:43
Xiangyang Liu 刘向阳6-Jan-04 4:43 
Questionmoving all an app's menus into menus.cs? Pin
TuringTest15-Jan-04 20:56
TuringTest15-Jan-04 20:56 
AnswerRe: moving all an app's menus into menus.cs? Pin
Member 2611885-Jan-04 22:17
Member 2611885-Jan-04 22:17 
AnswerRe: moving all an app's menus into menus.cs? Pin
Heath Stewart6-Jan-04 3:27
protectorHeath Stewart6-Jan-04 3:27 
QuestionFinding a server in a network? Pin
peshkata5-Jan-04 20:40
susspeshkata5-Jan-04 20:40 
AnswerRe: Finding a server in a network? Pin
Mazdak6-Jan-04 1:50
Mazdak6-Jan-04 1:50 

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.