Click here to Skip to main content
15,867,771 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Plugin Application in c# Pin
Aryadip18-May-04 0:11
Aryadip18-May-04 0:11 
GeneralRe: Plugin Application in c# Pin
Philip Fitzsimons18-May-04 3:10
Philip Fitzsimons18-May-04 3:10 
GeneralRe: Plugin Application in c# Pin
holland_phillip1-Jun-04 9:10
holland_phillip1-Jun-04 9:10 
Generalproblems with configuration settings Pin
Gerda_S16-May-04 21:47
Gerda_S16-May-04 21:47 
GeneralRe: problems with configuration settings Pin
TigerNinja_18-May-04 6:05
TigerNinja_18-May-04 6:05 
GeneralValidation Controls Question Pin
gmhanna16-May-04 9:56
gmhanna16-May-04 9:56 
GeneralRe: Validation Controls Question Pin
Mike Ellison18-May-04 20:07
Mike Ellison18-May-04 20:07 
GeneralHELP! Reading Files... Pin
mikasa15-May-04 12:23
mikasa15-May-04 12:23 
Ok, in no way am I a N00b at reading files! However, I was debugging some code today in which I was using a IO.StreamReader to read the text from a file and using an IO.StreamWriter to write it into a different file.

This file is about 3.2MB. The StreamReader DOES return the Correct Length of the File (IO.StreamReader.BaseStream.Length). HOWEVER, while reading the file, the Stream THINKS it has reached the end, and like a good little programmer, I Flush the StreamWriter (BTW, I am flushing every 8096 Bytes - yes, that IS a lot of water!) but I am missing a HUGE chunk of data at the End of my file!

I have noticed that the IO.StreamReader.BaseStream.Position is usually TOTALLY different than the Sum of the Bytes returned for each re-iteration of retrieving data. For example, reading in 8096 Bytes at a time, when my Position variable thinks it's at 16,192, the BaseStream has it's internal buffer set to some other amount... Is this what's messing it up?

Notice however, it I REALLY want to waste a lot of memory and processing time, I can just read it all in at once (IO.StreamReader.ReadToEnd) and then process it....GreeeEEEAAAaaaat!!! Just what I want! NOT!!!

So...what the @%$* is going on!??? How do I read the rest of the data!??? WTF | :WTF:
GeneralRe: HELP! Reading Files... Pin
mikasa15-May-04 12:40
mikasa15-May-04 12:40 
GeneralRe: HELP! Reading Files... Pin
mikasa15-May-04 12:59
mikasa15-May-04 12:59 
GeneralRe: HELP! Reading Files... Pin
TigerNinja_20-May-04 8:34
TigerNinja_20-May-04 8:34 
GeneralRe: HELP! Reading Files... Pin
mikasa20-May-04 8:46
mikasa20-May-04 8:46 
GeneralRe: HELP! Reading Files... Pin
Colin Angus Mackay23-May-04 2:00
Colin Angus Mackay23-May-04 2:00 
GeneralRe: HELP! Reading Files... Pin
mikasa23-May-04 6:51
mikasa23-May-04 6:51 
QuestionTreeView - Howto add Controls? Pin
mgaerber14-May-04 9:23
mgaerber14-May-04 9:23 
AnswerRe: TreeView - Howto add Controls? Pin
mikasa15-May-04 13:00
mikasa15-May-04 13:00 
AnswerRe: TreeView - Howto add Controls? Pin
TigerNinja_18-May-04 19:14
TigerNinja_18-May-04 19:14 
Generalcomposite web control Pin
sangeetha bhatta13-May-04 19:10
sangeetha bhatta13-May-04 19:10 
GeneralRe: composite web control Pin
TigerNinja_14-May-04 8:01
TigerNinja_14-May-04 8:01 
General.net Pin
Yulianto.13-May-04 17:44
Yulianto.13-May-04 17:44 
GeneralRe: .net Pin
TigerNinja_14-May-04 8:05
TigerNinja_14-May-04 8:05 
GeneralTELL ME I'M WRONG !! Pin
philippe dykmans13-May-04 15:13
philippe dykmans13-May-04 15:13 
GeneralRe: TELL ME I'M WRONG !! Pin
TigerNinja_14-May-04 13:52
TigerNinja_14-May-04 13:52 
GeneralRe: TELL ME I'M WRONG !! Pin
philippe dykmans15-May-04 4:24
philippe dykmans15-May-04 4:24 
GeneralProblem with TCP in a derived UserControl Pin
Tim Kohler13-May-04 8:47
Tim Kohler13-May-04 8:47 

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.