Click here to Skip to main content
15,884,099 members
Home / Discussions / C#
   

C#

 
GeneralRe: Desktop Calender Repost Pin
WinSolution1-Mar-09 2:32
WinSolution1-Mar-09 2:32 
GeneralRe: Desktop Calender Repost Pin
0x3c01-Mar-09 6:27
0x3c01-Mar-09 6:27 
AnswerRe: Desktop Calender Repost Pin
AKNR Chandra Sekhar19-Mar-09 8:47
AKNR Chandra Sekhar19-Mar-09 8:47 
QuestionSaving User and Application Settings in WinForms Pin
Sokka9328-Feb-09 21:29
Sokka9328-Feb-09 21:29 
AnswerRe: Saving User and Application Settings in WinForms Pin
ABitSmart1-Mar-09 0:30
ABitSmart1-Mar-09 0:30 
GeneralRe: Saving User and Application Settings in WinForms Pin
Sokka931-Mar-09 0:54
Sokka931-Mar-09 0:54 
AnswerRe: Saving User and Application Settings in WinForms Pin
Henry Minute1-Mar-09 1:23
Henry Minute1-Mar-09 1:23 
QuestionFile Not Found Exception Handling Pin
Lim Yuxuan28-Feb-09 21:29
Lim Yuxuan28-Feb-09 21:29 
Hi I am trying to handle a file not found exception by creating the specified text file if it does not exists.

void RetrieveData()
{
if(File.Exists("books.txt") == false) // if file doesnt exists
{
File.Create("books.txt"); // create the file
}
//Create a stream reader object to read from "books.txt"
StreamReader DataReader = new StreamReader("books.txt");
}

I did a test run and remove the books.txt file from the current working directory on purpose and when i start debugging all I get is this exception :

The process cannot access the file 'C:\Documents and Settings\Administrator\My Documents\NYP Work\C#\MiniProject 2009\PhotoAlbum_V2\bin\Debug\books.txt' because it is being used by another process.

Any suggested solutions ?
AnswerRe: File Not Found Exception Handling Pin
0x3c028-Feb-09 23:16
0x3c028-Feb-09 23:16 
GeneralRe: File Not Found Exception Handling Pin
Lim Yuxuan1-Mar-09 1:27
Lim Yuxuan1-Mar-09 1:27 
Questionbuilding network in form of a graph Pin
sunnyk8628-Feb-09 20:52
sunnyk8628-Feb-09 20:52 
AnswerRe: building network in form of a graph Pin
Yusuf28-Feb-09 21:16
Yusuf28-Feb-09 21:16 
AnswerRe: building network in form of a graph Pin
Eytukan1-Mar-09 2:41
Eytukan1-Mar-09 2:41 
Questiontoolbar moving Pin
shefa' isied28-Feb-09 20:42
shefa' isied28-Feb-09 20:42 
AnswerRe: toolbar moving Pin
Yusuf28-Feb-09 21:17
Yusuf28-Feb-09 21:17 
QuestionSocket Pin
mrithula828-Feb-09 20:39
mrithula828-Feb-09 20:39 
AnswerRe: Socket Pin
Yusuf28-Feb-09 21:22
Yusuf28-Feb-09 21:22 
GeneralRe: Socket Pin
mrithula828-Feb-09 22:47
mrithula828-Feb-09 22:47 
GeneralRe: Socket Pin
0x3c028-Feb-09 23:23
0x3c028-Feb-09 23:23 
GeneralRe: Socket Pin
mrithula828-Feb-09 23:39
mrithula828-Feb-09 23:39 
GeneralRe: Socket Pin
0x3c028-Feb-09 23:54
0x3c028-Feb-09 23:54 
GeneralRe: Socket Pin
mrithula81-Mar-09 17:22
mrithula81-Mar-09 17:22 
GeneralRe: Socket Pin
mrithula81-Mar-09 18:48
mrithula81-Mar-09 18:48 
QuestionHow to Copy Form in Project ? Pin
E_Gold28-Feb-09 20:12
E_Gold28-Feb-09 20:12 
AnswerRe: How to Copy Form in Project ? Pin
Yusuf28-Feb-09 21:26
Yusuf28-Feb-09 21:26 

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.