Click here to Skip to main content
15,888,984 members
Home / Discussions / C#
   

C#

 
GeneralRe: XML in c# multi Elements Pin
Heath Stewart4-Feb-05 12:57
protectorHeath Stewart4-Feb-05 12:57 
QuestionListbox problem solved! But WHY?? Pin
chrismarek4-Feb-05 8:18
chrismarek4-Feb-05 8:18 
Generaladding attachments to an email Pin
Aviv Halperin4-Feb-05 6:05
Aviv Halperin4-Feb-05 6:05 
GeneralRe: adding attachments to an email Pin
Heath Stewart4-Feb-05 6:31
protectorHeath Stewart4-Feb-05 6:31 
QuestionHow to have MenuItems not show arrow when it has submenu Pin
VPMahank4-Feb-05 5:28
VPMahank4-Feb-05 5:28 
GeneralSocket and Multithreading Pin
sameerhanda4-Feb-05 5:05
sameerhanda4-Feb-05 5:05 
GeneralRe: Socket and Multithreading Pin
Heath Stewart4-Feb-05 6:24
protectorHeath Stewart4-Feb-05 6:24 
GeneralFilestream issue Pin
Esmo20004-Feb-05 4:43
Esmo20004-Feb-05 4:43 
I have a binary which I wish to save to my local disk. I want to use a filestream to save this binary to my hard disk. In the case that it is already there, I want to delete it and then save it.

I used this code:
// Local is some file location
FileInfo fi = new FileInfo(local);
if(fi.Exists)
fi.Delete();
FileStream fstr = fi.Create();
fstr.Write(openedBinary, 0, openedBinary.Length);
fstr.Flush();
fstr.Close();

However, in the next line, I have another function that makes use of this binary which is now locally stored. SOMETIMES, that works, usually it doesn't. I don't quite know why! Can someone tell me why this would act unpredictably?

Cheers,
Jim
GeneralRe: Filestream issue Pin
Esmo20004-Feb-05 4:46
Esmo20004-Feb-05 4:46 
GeneralRe: Filestream issue Pin
Anonymous4-Feb-05 4:57
Anonymous4-Feb-05 4:57 
GeneralRe: Filestream issue Pin
Heath Stewart4-Feb-05 6:20
protectorHeath Stewart4-Feb-05 6:20 
GeneralBeep() without using Windows.Forms Pin
Tim Gilbert4-Feb-05 4:32
Tim Gilbert4-Feb-05 4:32 
GeneralRe: Beep() without using Windows.Forms Pin
Anonymous4-Feb-05 4:39
Anonymous4-Feb-05 4:39 
GeneralRe: Beep() without using Windows.Forms Pin
Tim Gilbert4-Feb-05 4:48
Tim Gilbert4-Feb-05 4:48 
GeneralRe: Beep() without using Windows.Forms Pin
Dave Kreskowiak4-Feb-05 6:33
mveDave Kreskowiak4-Feb-05 6:33 
GeneralRe: Beep() without using Windows.Forms Pin
Nick Parker4-Feb-05 6:13
protectorNick Parker4-Feb-05 6:13 
GeneralRe: Beep() without using Windows.Forms Pin
Heath Stewart4-Feb-05 6:16
protectorHeath Stewart4-Feb-05 6:16 
GeneralRe: Beep() without using Windows.Forms Pin
Dave Kreskowiak4-Feb-05 6:35
mveDave Kreskowiak4-Feb-05 6:35 
GeneralLinkLabel size Pin
gantww4-Feb-05 3:39
gantww4-Feb-05 3:39 
GeneralRe: LinkLabel size Pin
Anonymous4-Feb-05 4:45
Anonymous4-Feb-05 4:45 
GeneralRe: LinkLabel size Pin
gantww4-Feb-05 7:54
gantww4-Feb-05 7:54 
GeneralImage Rectify or Panorama algorithm Pin
pxp4-Feb-05 3:15
pxp4-Feb-05 3:15 
GeneralRe: Image Rectify or Panorama algorithm Pin
pxp6-Feb-05 23:15
pxp6-Feb-05 23:15 
QuestionHow can I controle by resource in C# Pin
students552 university4-Feb-05 2:51
students552 university4-Feb-05 2:51 
AnswerRe: How can I controle by resource in C# Pin
Judah Gabriel Himango4-Feb-05 6:38
sponsorJudah Gabriel Himango4-Feb-05 6:38 

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.