Click here to Skip to main content
15,905,028 members
Home / Discussions / C#
   

C#

 
QuestionGeneric List in UserControl Pin
Ian Grech15-Jun-10 9:02
Ian Grech15-Jun-10 9:02 
AnswerRe: Generic List in UserControl Pin
Henry Minute15-Jun-10 11:36
Henry Minute15-Jun-10 11:36 
GeneralRe: Generic List in UserControl Pin
Ian Grech15-Jun-10 19:25
Ian Grech15-Jun-10 19:25 
QuestionMessage Removed Pin
15-Jun-10 8:22
professionalsafame2015-Jun-10 8:22 
AnswerRe: I am having some Problems in Implementing Threads for Listview PinPopular
Luc Pattyn15-Jun-10 8:54
sitebuilderLuc Pattyn15-Jun-10 8:54 
QuestionMesauring paint on a winforms panel Pin
Berlus15-Jun-10 7:18
Berlus15-Jun-10 7:18 
AnswerRe: Mesauring paint on a winforms panel Pin
Luc Pattyn15-Jun-10 7:57
sitebuilderLuc Pattyn15-Jun-10 7:57 
GeneralRe: Mesauring paint on a winforms panel Pin
Berlus15-Jun-10 10:57
Berlus15-Jun-10 10:57 
GeneralRe: Mesauring paint on a winforms panel Pin
Luc Pattyn15-Jun-10 11:22
sitebuilderLuc Pattyn15-Jun-10 11:22 
GeneralRe: Mesauring paint on a winforms panel Pin
Berlus15-Jun-10 19:41
Berlus15-Jun-10 19:41 
GeneralRe: Mesauring paint on a winforms panel Pin
Luc Pattyn16-Jun-10 2:00
sitebuilderLuc Pattyn16-Jun-10 2:00 
GeneralRe: Mesauring paint on a winforms panel Pin
Berlus16-Jun-10 10:02
Berlus16-Jun-10 10:02 
GeneralRe: Mesauring paint on a winforms panel Pin
Luc Pattyn16-Jun-10 10:12
sitebuilderLuc Pattyn16-Jun-10 10:12 
Questionstring matching Pin
arkiboys15-Jun-10 6:56
arkiboys15-Jun-10 6:56 
AnswerRe: string matching Pin
Ravi Bhavnani15-Jun-10 7:00
professionalRavi Bhavnani15-Jun-10 7:00 
AnswerRe: string matching [modified] Pin
Luc Pattyn15-Jun-10 7:05
sitebuilderLuc Pattyn15-Jun-10 7:05 
AnswerRe: string matching Pin
Dave Kreskowiak15-Jun-10 7:08
mveDave Kreskowiak15-Jun-10 7:08 
GeneralRe: string matching Pin
Luc Pattyn15-Jun-10 7:13
sitebuilderLuc Pattyn15-Jun-10 7:13 
GeneralRe: string matching Pin
arkiboys15-Jun-10 7:59
arkiboys15-Jun-10 7:59 
AnswerRe: string matching Pin
T M Gray15-Jun-10 8:34
T M Gray15-Jun-10 8:34 
GeneralRe: string matching Pin
arkiboys15-Jun-10 8:46
arkiboys15-Jun-10 8:46 
GeneralRe: string matching Pin
Luc Pattyn15-Jun-10 11:36
sitebuilderLuc Pattyn15-Jun-10 11:36 
GeneralRe: string matching Pin
arkiboys15-Jun-10 11:38
arkiboys15-Jun-10 11:38 
GeneralRe: string matching Pin
Luc Pattyn15-Jun-10 11:38
sitebuilderLuc Pattyn15-Jun-10 11:38 
QuestionSystem.IO.Exception Pin
MWRivera15-Jun-10 6:32
MWRivera15-Jun-10 6:32 
Hi All,

I'm recieving a System.IO.Exception after creating a file and then trying to append text to that file. The message I recieve is:

The process cannot access the file 'File path goes here' because it is being used by another process.


The code to create the file is:

if (!File.Exists(filePath))
    File.Create(filePath);


The code I'm using to try and append text to the file is:

StreamWriter sw = File.AppendText(readIDFilePath);


Does any one have any clue to why I am recieving this exception? Does File.Create open the file it's creating?
Is the file already exists then no System.IO.Exception is recieved.

Any feedback would be greatly appreciated.

Thanks,
Mel

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.