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

C#

 
AnswerRe: compile time error or runtime error? Pin
Charith Jayasundara4-May-08 8:04
Charith Jayasundara4-May-08 8:04 
GeneralRe: compile time error or runtime error? Pin
George_George4-May-08 18:46
George_George4-May-08 18:46 
QuestionNumbers Don't Display According To The Current Culture! Pin
WaleedH3-May-08 23:21
WaleedH3-May-08 23:21 
QuestionDateTime Hour Minute Question Pin
MumbleB3-May-08 22:38
MumbleB3-May-08 22:38 
AnswerRe: DateTime Hour Minute Question Pin
MumbleB3-May-08 22:42
MumbleB3-May-08 22:42 
GeneralRe: DateTime Hour Minute Question Pin
Luc Pattyn3-May-08 23:07
sitebuilderLuc Pattyn3-May-08 23:07 
GeneralRe: DateTime Hour Minute Question Pin
MumbleB3-May-08 23:45
MumbleB3-May-08 23:45 
GeneralRe: DateTime Hour Minute Question [modified] Pin
#realJSOP4-May-08 3:53
mve#realJSOP4-May-08 3:53 
It takes a little time to create a file, but the time it takes is enough to pretty much guarantee a unique name every time, especially if your code is performing exception handling (which it should), and properly closing the file (which it should). If you include the millisecond portion of the date time, you should be good to go. Besides, if you think there's a chance of it, the simple solution is to insert the line Thread.Sleep(25); just before you create the file. Doing so guarantees a unique filename using the date/time naming method, and it will introduce unnoticeable latency in your code.

If you don't really care what the file name is as long as it's unique, use a GUID for the name. A GUID is guaranteed to be unique no matter how many you create in a given second.


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


modified on Sunday, May 4, 2008 10:04 AM

GeneralRe: DateTime Hour Minute Question Pin
PIEBALDconsult4-May-08 5:55
mvePIEBALDconsult4-May-08 5:55 
GeneralRe: DateTime Hour Minute Question Pin
Luc Pattyn4-May-08 11:40
sitebuilderLuc Pattyn4-May-08 11:40 
QuestionCPU and RAM Usage Pin
Ian Uy3-May-08 19:44
Ian Uy3-May-08 19:44 
AnswerRe: CPU and RAM Usage Pin
MumbleB3-May-08 22:13
MumbleB3-May-08 22:13 
QuestionOutput to word? Pin
Muammar©3-May-08 19:40
Muammar©3-May-08 19:40 
AnswerRe: Output to word? Pin
MumbleB3-May-08 22:21
MumbleB3-May-08 22:21 
GeneralRe: Output to word? Pin
Muammar©3-May-08 23:05
Muammar©3-May-08 23:05 
Questionabout desktop.ini. [modified] Pin
Prabhat0033-May-08 18:55
Prabhat0033-May-08 18:55 
AnswerRe: about desktop.ini. Pin
Muammar©3-May-08 19:49
Muammar©3-May-08 19:49 
GeneralRe: about autorun.ini. Pin
Prabhat0033-May-08 20:18
Prabhat0033-May-08 20:18 
GeneralRe: about autorun.ini. Pin
Muammar©3-May-08 20:21
Muammar©3-May-08 20:21 
QuestionControl media player with C# Pin
BobbyWhiskey3-May-08 18:16
BobbyWhiskey3-May-08 18:16 
QuestionRiemer's code Pin
sakirah3-May-08 14:28
sakirah3-May-08 14:28 
AnswerRe: Riemer's code Pin
Christian Graus3-May-08 15:11
protectorChristian Graus3-May-08 15:11 
AnswerRe: Riemer's code Pin
MarkB7774-May-08 0:22
MarkB7774-May-08 0:22 
QuestionUrgent please Pin
Sahar1113-May-08 11:51
Sahar1113-May-08 11:51 
AnswerRe: Urgent please Pin
Oakman3-May-08 12:13
Oakman3-May-08 12:13 

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.