Click here to Skip to main content
15,913,270 members
Home / Discussions / C#
   

C#

 
GeneralRe: Closing the FolderBrowserDialog programatically Pin
panks_r3-May-07 19:33
panks_r3-May-07 19:33 
AnswerRe: Closing the FolderBrowserDialog programatically Pin
PIEBALDconsult3-May-07 14:42
mvePIEBALDconsult3-May-07 14:42 
QuestionGetting the bin directory location for a service??!! Pin
LongRange.Shooter2-May-07 5:34
LongRange.Shooter2-May-07 5:34 
AnswerRe: Getting the bin directory location for a service -- Answer FOUND Pin
LongRange.Shooter2-May-07 6:39
LongRange.Shooter2-May-07 6:39 
AnswerRe: Getting the bin directory location for a service??!! Pin
PIEBALDconsult2-May-07 15:03
mvePIEBALDconsult2-May-07 15:03 
GeneralRe: Getting the bin directory location for a service??!! Pin
LongRange.Shooter3-May-07 1:38
LongRange.Shooter3-May-07 1:38 
GeneralRe: Getting the bin directory location for a service??!! Pin
PIEBALDconsult3-May-07 5:59
mvePIEBALDconsult3-May-07 5:59 
QuestionException Handling for Files in C# - Append Mode Pin
rajesh_kumar_242-May-07 4:55
rajesh_kumar_242-May-07 4:55 
Hi,

I wanted to catch two different types of exceptions in custom log file code. When the second instance of log file is trying to write while the first instance is still writing some message, C# is throwing IOException when the file is opened in Append and Share None mode.

When I try to access a folder which does not exists, in that case also compiler is throwing the same exception.

I tried with the following code:

try
{
FileStream fileWriter = File.Open(@"C:\Test\Test.log", FileMode.Append, FileAccess.Write, FileShare.None);
FileStream fileWriter1 = File.Open(@"C:\Test\Test.log", FileMode.Append, FileAccess.Write, FileShare.None);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}

Is there any way to catch those two scenarios with some unique identity?

Please advise in email to rajesh_a_kumar@dell.com

Thanks,
Rajesh
rajesh_a_kumar@dell.com
AnswerRe: Exception Handling for Files in C# - Append Mode Pin
Tarakeshwar Reddy2-May-07 5:08
professionalTarakeshwar Reddy2-May-07 5:08 
GeneralRe: Exception Handling for Files in C# - Append Mode Pin
rajesh_kumar_242-May-07 19:06
rajesh_kumar_242-May-07 19:06 
GeneralRe: Exception Handling for Files in C# - Append Mode Pin
Tarakeshwar Reddy3-May-07 2:35
professionalTarakeshwar Reddy3-May-07 2:35 
AnswerRe: Exception Handling for Files in C# - Append Mode Pin
Guffa2-May-07 8:11
Guffa2-May-07 8:11 
AnswerRe: Exception Handling for Files in C# - Append Mode Pin
AFSEKI7-May-07 6:30
AFSEKI7-May-07 6:30 
QuestionAnyone know anything about HIPAA compliance??? Pin
Goalie352-May-07 4:34
Goalie352-May-07 4:34 
AnswerRe: Anyone know anything about HIPAA compliance??? Pin
Dave Kreskowiak2-May-07 5:03
mveDave Kreskowiak2-May-07 5:03 
AnswerRe: Anyone know anything about HIPAA compliance??? Pin
Russell Morris2-May-07 18:49
Russell Morris2-May-07 18:49 
GeneralCheck boxes and Bit fields Pin
Brady Kelly2-May-07 4:26
Brady Kelly2-May-07 4:26 
QuestionHow to embed a .exe file in c# windows application Pin
r_jaz2-May-07 4:26
r_jaz2-May-07 4:26 
AnswerRe: How to embed a .exe file in c# windows application Pin
Dave Kreskowiak2-May-07 4:58
mveDave Kreskowiak2-May-07 4:58 
GeneralRe: How to embed a .exe file in c# windows application Pin
Giorgi Dalakishvili2-May-07 7:04
mentorGiorgi Dalakishvili2-May-07 7:04 
GeneralRe: How to embed a .exe file in c# windows application Pin
Dave Kreskowiak2-May-07 7:08
mveDave Kreskowiak2-May-07 7:08 
GeneralRe: How to embed a .exe file in c# windows application Pin
r_jaz2-May-07 7:44
r_jaz2-May-07 7:44 
GeneralRe: How to embed a .exe file in c# windows application Pin
Dave Kreskowiak2-May-07 8:12
mveDave Kreskowiak2-May-07 8:12 
GeneralRe: How to embed a .exe file in c# windows application Pin
r_jaz2-May-07 8:20
r_jaz2-May-07 8:20 
GeneralRe: How to embed a .exe file in c# windows application Pin
Dave Kreskowiak2-May-07 9:09
mveDave Kreskowiak2-May-07 9:09 

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.