Click here to Skip to main content
15,894,343 members
Home / Discussions / C#
   

C#

 
GeneralRe: text file > Binary and Binary > Text file Pin
grmihel217-Feb-11 1:22
grmihel217-Feb-11 1:22 
GeneralRe: text file > Binary and Binary > Text file Pin
Richard MacCutchan17-Feb-11 1:46
mveRichard MacCutchan17-Feb-11 1:46 
GeneralRe: text file > Binary and Binary > Text file Pin
grmihel217-Feb-11 4:07
grmihel217-Feb-11 4:07 
GeneralRe: text file > Binary and Binary > Text file Pin
Richard MacCutchan17-Feb-11 4:24
mveRichard MacCutchan17-Feb-11 4:24 
GeneralRe: text file > Binary and Binary > Text file Pin
grmihel217-Feb-11 4:28
grmihel217-Feb-11 4:28 
GeneralRe: text file > Binary and Binary > Text file Pin
Richard MacCutchan17-Feb-11 4:33
mveRichard MacCutchan17-Feb-11 4:33 
GeneralRe: text file > Binary and Binary > Text file Pin
grmihel218-Feb-11 0:14
grmihel218-Feb-11 0:14 
GeneralRe: text file > Binary and Binary > Text file Pin
Richard MacCutchan18-Feb-11 1:36
mveRichard MacCutchan18-Feb-11 1:36 
You seem to be getting confused with your file IO code:
                int length = (int)data.Length;
                int buffer = 1000;  // what is this for?

                fileStream.SetLength(length);  // what is this for?
                fileStream.Seek(length - buffer, SeekOrigin.Begin);  // what is this for?
//                 fileStream.Write(data, 0, buffer);
// instead do
                fileStream.Write(data, 0, data.Length);
                fileStream.Flush();

I would suggest spending some time here[^] to get a better understanding of the FileStream class.
I must get a clever new signature for 2011.

GeneralRe: text file > Binary and Binary > Text file Pin
grmihel218-Feb-11 2:12
grmihel218-Feb-11 2:12 
GeneralRe: text file > Binary and Binary > Text file Pin
Richard MacCutchan18-Feb-11 2:45
mveRichard MacCutchan18-Feb-11 2:45 
QuestionDo I need to store my database in Application Data folder instead of Application.StartUp folder Pin
Nadia Monalisa16-Feb-11 22:35
Nadia Monalisa16-Feb-11 22:35 
AnswerRe: Do I need to store my database in Application Data folder instead of Application.StartUp folder Pin
Bernhard Hiller16-Feb-11 22:51
Bernhard Hiller16-Feb-11 22:51 
AnswerRe: Do I need to store my database in Application Data folder instead of Application.StartUp folder Pin
PIEBALDconsult17-Feb-11 1:47
mvePIEBALDconsult17-Feb-11 1:47 
QuestionEncryption and descryption using 3DES [modified] Pin
sarang_k16-Feb-11 21:58
sarang_k16-Feb-11 21:58 
AnswerRe: Encryption and descryption using 3DES Pin
OriginalGriff16-Feb-11 22:48
mveOriginalGriff16-Feb-11 22:48 
AnswerRe: Encryption and descryption using 3DES Pin
Bernhard Hiller16-Feb-11 22:56
Bernhard Hiller16-Feb-11 22:56 
AnswerRe: Encryption and descryption using 3DES Pin
RaviRanjanKr21-Feb-11 18:05
professionalRaviRanjanKr21-Feb-11 18:05 
QuestionHow to prevent usage of class libraries shipped with application? Pin
Chesnokov Yuriy16-Feb-11 21:37
professionalChesnokov Yuriy16-Feb-11 21:37 
AnswerRe: How to prevent usage of class libraries shipped with application? Pin
Groulien16-Feb-11 22:58
Groulien16-Feb-11 22:58 
AnswerRe: How to prevent usage of class libraries shipped with application? Pin
Bernhard Hiller16-Feb-11 23:07
Bernhard Hiller16-Feb-11 23:07 
AnswerRe: How to prevent usage of class libraries shipped with application? Pin
jschell17-Feb-11 8:27
jschell17-Feb-11 8:27 
QuestionRaise COM Event within C# Pin
califax2k16-Feb-11 21:03
califax2k16-Feb-11 21:03 
AnswerRe: Raise COM Event within C# Pin
Bernhard Hiller16-Feb-11 23:14
Bernhard Hiller16-Feb-11 23:14 
QuestionDLL and config file problem Pin
david bagaturia16-Feb-11 20:56
david bagaturia16-Feb-11 20:56 
AnswerRe: DLL and config file problem Pin
Bernhard Hiller17-Feb-11 3:09
Bernhard Hiller17-Feb-11 3: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.