Click here to Skip to main content
16,017,281 members
Home / Discussions / C#
   

C#

 
QuestionSuperscript Pin
Patrik Ruzic29-Aug-05 19:49
Patrik Ruzic29-Aug-05 19:49 
AnswerRe: Superscript Pin
Christian Graus29-Aug-05 20:03
protectorChristian Graus29-Aug-05 20:03 
Questionhelp me to correct my code Pin
sajikp29-Aug-05 19:39
sajikp29-Aug-05 19:39 
AnswerRe: help me to correct my code Pin
Christian Graus29-Aug-05 19:42
protectorChristian Graus29-Aug-05 19:42 
GeneralRe: help me to correct my code Pin
sajikp29-Aug-05 19:58
sajikp29-Aug-05 19:58 
GeneralRe: help me to correct my code Pin
Christian Graus29-Aug-05 20:01
protectorChristian Graus29-Aug-05 20:01 
GeneralRe: help me to correct my code Pin
sajikp29-Aug-05 20:54
sajikp29-Aug-05 20:54 
QuestionProblems with FileStream Pin
Tehnoon Raza29-Aug-05 19:13
sussTehnoon Raza29-Aug-05 19:13 
I am using the FileStream class to write and read from files. I am using it in a server to which the clients can connect and read data from the file(s). The server, on the other hand is also writing data to the files after regular intervals of time. To write the data to the file, the server creates a FileStream object in the following way:
FileStream dataStream = new FileStream(dataFileName, FileMode.Open, FileAccess.Write);
As is clear from above, the server opens the file in write only mode and it shouldn't be a problem to read from the file.
To read data from the file, following code is used:
FileStream stream = new FileStream(fileNames[i].ToString(), FileMode.Open, FileAccess.Read);
As is clear here, I open the file in read-only mode. The problem is, that if the above code executes during the time when the server has already opened the stream for writing, I get an exception (Cannot access the file as it is being used by some other process).
Any help in this regard would be highly appreciated
AnswerRe: Problems with FileStream Pin
Christian Graus29-Aug-05 19:24
protectorChristian Graus29-Aug-05 19:24 
GeneralRe: Problems with FileStream Pin
Member 171916929-Aug-05 19:34
Member 171916929-Aug-05 19:34 
GeneralRe: Problems with FileStream Pin
Christian Graus29-Aug-05 19:40
protectorChristian Graus29-Aug-05 19:40 
GeneralRe: Problems with FileStream Pin
Matt Gerrans29-Aug-05 20:09
Matt Gerrans29-Aug-05 20:09 
GeneralRe: Problems with FileStream Pin
Dave Kreskowiak30-Aug-05 7:41
mveDave Kreskowiak30-Aug-05 7:41 
QuestionComparing string with string array Pin
binglin29-Aug-05 18:58
binglin29-Aug-05 18:58 
AnswerRe: Comparing string with string array Pin
Guffa29-Aug-05 19:04
Guffa29-Aug-05 19:04 
AnswerRe: Comparing string with string array Pin
mkani30-Aug-05 21:19
mkani30-Aug-05 21:19 
QuestionTimer Pin
Taurian11029-Aug-05 18:28
Taurian11029-Aug-05 18:28 
AnswerRe: Timer Pin
Andy Brummer29-Aug-05 18:41
sitebuilderAndy Brummer29-Aug-05 18:41 
AnswerRe: Timer Pin
Alomgir Miah29-Aug-05 18:47
Alomgir Miah29-Aug-05 18:47 
AnswerRe: Timer Pin
mav.northwind29-Aug-05 20:35
mav.northwind29-Aug-05 20:35 
Questionhow to add web refrence through coding in c# Pin
mkani29-Aug-05 18:15
mkani29-Aug-05 18:15 
AnswerRe: how to add web refrence through coding in c# Pin
Andy Brummer29-Aug-05 18:48
sitebuilderAndy Brummer29-Aug-05 18:48 
QuestionHow to call to MAIN Pin
levi's29-Aug-05 18:08
levi's29-Aug-05 18:08 
QuestionCheck TextBox To Confirm Number? Pin
...---...29-Aug-05 16:27
...---...29-Aug-05 16:27 
AnswerRe: Check TextBox To Confirm Number? Pin
Christian Graus29-Aug-05 16:43
protectorChristian Graus29-Aug-05 16:43 

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.