Click here to Skip to main content
15,867,453 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# - Use app between 2 times and get the time from database Pin
Dave Kreskowiak8-Nov-20 18:54
mveDave Kreskowiak8-Nov-20 18:54 
AnswerRe: C# - Use app between 2 times and get the time from database Pin
Gerry Schmitz9-Nov-20 1:51
mveGerry Schmitz9-Nov-20 1:51 
QuestionWeird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver6-Nov-20 16:24
pr1mem0ver6-Nov-20 16: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 18:18
mveGerry Schmitz6-Nov-20 18:18 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver7-Nov-20 5:00
pr1mem0ver7-Nov-20 5: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 5:37
mveGerry Schmitz7-Nov-20 5:37 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver7-Nov-20 13:25
pr1mem0ver7-Nov-20 13: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 5:53
mveGerry Schmitz8-Nov-20 5:53 
An "adapter" pattern lets you manipulate the filestream; instead, you want to "act" like a filestream. Since you didn't write filestream, you really have less control.

You also outlined 2 distinct functions. So, filestream in fact, is now schizophrenic.

Anyway, your problem seems to be you "request" "count" bytes, read, then don't bother to check "result" (actual bytes read) against "count"; and then proceed to calculate a new offset using "count" (instead of result).

Not "superior"; I'm just not the coddling kind. Have a nice day.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food

GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver16-Nov-20 14:58
pr1mem0ver16-Nov-20 14:58 
AnswerRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
OriginalGriff8-Nov-20 1:35
mveOriginalGriff8-Nov-20 1:35 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver16-Nov-20 15:10
pr1mem0ver16-Nov-20 15: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 21:39
mveRichard Deeming8-Nov-20 21:39 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver16-Nov-20 15:06
pr1mem0ver16-Nov-20 15:06 
QuestionSystem.IO.File.WriteAllLines exception Pin
_Flaviu5-Nov-20 23:52
_Flaviu5-Nov-20 23:52 
AnswerRe: System.IO.File.WriteAllLines exception Pin
Richard MacCutchan6-Nov-20 0:01
mveRichard MacCutchan6-Nov-20 0:01 
AnswerRe: System.IO.File.WriteAllLines exception Pin
OriginalGriff6-Nov-20 0:18
mveOriginalGriff6-Nov-20 0:18 
GeneralRe: System.IO.File.WriteAllLines exception Pin
_Flaviu6-Nov-20 2:33
_Flaviu6-Nov-20 2:33 
AnswerRe: System.IO.File.WriteAllLines exception Pin
Richard MacCutchan6-Nov-20 5:21
mveRichard MacCutchan6-Nov-20 5:21 
GeneralRe: System.IO.File.WriteAllLines exception Pin
_Flaviu7-Nov-20 21:08
_Flaviu7-Nov-20 21:08 
QuestionHow to extract part of HTML source? Pin
Member 5697394-Nov-20 7:53
Member 5697394-Nov-20 7:53 
AnswerRe: How to extract part of HTML source? Pin
OriginalGriff4-Nov-20 8:37
mveOriginalGriff4-Nov-20 8:37 
GeneralRe: How to extract part of HTML source? Pin
Member 5697394-Nov-20 9:12
Member 5697394-Nov-20 9:12 
AnswerRe: How to extract part of HTML source? Pin
Richard Andrew x644-Nov-20 14:11
professionalRichard Andrew x644-Nov-20 14:11 
AnswerRe: How to extract part of HTML source? Pin
DerekT-P4-Nov-20 23:29
professionalDerekT-P4-Nov-20 23:29 
GeneralRe: How to extract part of HTML source? Pin
Richard Deeming4-Nov-20 23:36
mveRichard Deeming4-Nov-20 23:36 

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.