Click here to Skip to main content
14,743,536 members
Home » Discussions » C#
   

C#

 
QuestionWeird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver6-Nov-20 17:24
Memberpr1mem0ver6-Nov-20 17:24 
AnswerRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
Gerry Schmitz6-Nov-20 19:18
mveGerry Schmitz6-Nov-20 19:18 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver7-Nov-20 6:00
Memberpr1mem0ver7-Nov-20 6:00 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
Gerry Schmitz7-Nov-20 6:37
mveGerry Schmitz7-Nov-20 6:37 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver7-Nov-20 14:25
Memberpr1mem0ver7-Nov-20 14:25 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
Gerry Schmitz8-Nov-20 6:53
mveGerry Schmitz8-Nov-20 6:53 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver16-Nov-20 15:58
Memberpr1mem0ver16-Nov-20 15:58 
AnswerRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
OriginalGriff8-Nov-20 2:35
mveOriginalGriff8-Nov-20 2:35 
We can't necessarily duplicate your problem from that code: we are lacking half the stuff that makes it work, such as the construction of your BinaryReader and it's FileStream.

So start by creating a minimum subset app which demonstrates the problem: uses the appropriate (cut-down) classes, dumps all the extraneous code, and shows the problem in as short a code as possible (but reflecting the structure you have in your existing code).
If that still shows the fault, show us the complete code so we can run it ourselves. If it doesn't, start looking at what you removed and put it back until it does ... then we can run it or it'll be fairly obvious what causes it.

Me? Without running it - and I can't - I'd guess that it's working but looks like it's failing for other reasons: if the return value is count then it's unlikely that the read is fetching considerably more data than that (somebody would have noticed by now). So you - and we - need a minimum app to show the problem so it can be looked at closely.

Sorry, but there is nothing I can do with those code fragments to prove your problem even exists!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver16-Nov-20 16:10
Memberpr1mem0ver16-Nov-20 16:10 
AnswerRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
Richard Deeming8-Nov-20 22:39
mveRichard Deeming8-Nov-20 22:39 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver16-Nov-20 16:06
Memberpr1mem0ver16-Nov-20 16:06 
QuestionSystem.IO.File.WriteAllLines exception Pin
_Flaviu6-Nov-20 0:52
Member_Flaviu6-Nov-20 0:52 
AnswerRe: System.IO.File.WriteAllLines exception Pin
Richard MacCutchan6-Nov-20 1:01
mveRichard MacCutchan6-Nov-20 1:01 
AnswerRe: System.IO.File.WriteAllLines exception Pin
OriginalGriff6-Nov-20 1:18
mveOriginalGriff6-Nov-20 1:18 
GeneralRe: System.IO.File.WriteAllLines exception Pin
_Flaviu6-Nov-20 3:33
Member_Flaviu6-Nov-20 3:33 
AnswerRe: System.IO.File.WriteAllLines exception Pin
Richard MacCutchan6-Nov-20 6:21
mveRichard MacCutchan6-Nov-20 6:21 
GeneralRe: System.IO.File.WriteAllLines exception Pin
_Flaviu7-Nov-20 22:08
Member_Flaviu7-Nov-20 22:08 
QuestionHow to extract part of HTML source? Pin
Member 5697394-Nov-20 8:53
MemberMember 5697394-Nov-20 8:53 
AnswerRe: How to extract part of HTML source? Pin
OriginalGriff4-Nov-20 9:37
mveOriginalGriff4-Nov-20 9:37 
GeneralRe: How to extract part of HTML source? Pin
Member 5697394-Nov-20 10:12
MemberMember 5697394-Nov-20 10:12 
AnswerRe: How to extract part of HTML source? Pin
Richard Andrew x644-Nov-20 15:11
professionalRichard Andrew x644-Nov-20 15:11 
AnswerRe: How to extract part of HTML source? Pin
DerekT-P5-Nov-20 0:29
professionalDerekT-P5-Nov-20 0:29 
GeneralRe: How to extract part of HTML source? Pin
Richard Deeming5-Nov-20 0:36
mveRichard Deeming5-Nov-20 0:36 
GeneralRe: How to extract part of HTML source? Pin
DerekT-P5-Nov-20 1:26
professionalDerekT-P5-Nov-20 1:26 
GeneralRe: How to extract part of HTML source? Pin
Member 5697395-Nov-20 4:56
MemberMember 5697395-Nov-20 4:56 

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.