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

.NET (Core and Framework)

 
GeneralRe: bug in XmlReader ? Pin
Chris Losinger5-Oct-06 15:00
professionalChris Losinger5-Oct-06 15:00 
AnswerRe: bug in XmlReader ? Pin
Guffa5-Oct-06 21:13
Guffa5-Oct-06 21:13 
GeneralRe: bug in XmlReader ? Pin
Chris Losinger6-Oct-06 1:46
professionalChris Losinger6-Oct-06 1:46 
GeneralRe: bug in XmlReader ? Pin
Mike Dimmick6-Oct-06 4:31
Mike Dimmick6-Oct-06 4:31 
GeneralRe: bug in XmlReader ? Pin
S. Senthil Kumar6-Oct-06 6:00
S. Senthil Kumar6-Oct-06 6:00 
GeneralRe: bug in XmlReader ? Pin
Mike Dimmick7-Oct-06 1:20
Mike Dimmick7-Oct-06 1:20 
GeneralRe: bug in XmlReader ? Pin
S. Senthil Kumar7-Oct-06 1:36
S. Senthil Kumar7-Oct-06 1:36 
AnswerRe: bug in XmlReader ? Pin
Guffa6-Oct-06 4:32
Guffa6-Oct-06 4:32 
Chris Losinger wrote:
that's just silly. surely you can see the difference between a function called "File.Open" and one called "XmlReader.Create".


If course there are differences, but that is not really relevant. You seem to fail to see the similarities.

Chris Losinger wrote:
in one case the caller expects and gets an open file, because that's the reason for calling the function. in the other, the caller doesn't get an open File object, has no access to any open File object, and isn't expecting one - the opened file is an undocumented side-effect.


You never get direct access to an open file through the framework. You access files through streams, readers and writers.

Chris Losinger wrote:
if it's the caller's responsibility that the XmlReader user should close the file, then why does XmlReader close the file by itself in some situations but not others; and why does the MSDN fail to mention anything about this behavior, or this "responsibility" ?

at best, this function is inconsistent in behavior and poorly-documented.


The reader closes the file if it knows that you can't use it any more. If you don't tell it anything and just leave it hanging, it can't close the file.

I don't really think that the documentation is poor, but it is not always easy to read. Some things are not spelled out as clearly as you would like, and some things are only mentioned once and not exactly where you expect it.


---
b { font-weight: normal; }

GeneralRe: bug in XmlReader ? Pin
Chris Losinger6-Oct-06 4:49
professionalChris Losinger6-Oct-06 4:49 
GeneralRe: bug in XmlReader ? Pin
Guffa6-Oct-06 10:04
Guffa6-Oct-06 10:04 
GeneralRe: bug in XmlReader ? Pin
Chris Losinger6-Oct-06 10:38
professionalChris Losinger6-Oct-06 10:38 
GeneralRe: bug in XmlReader ? Pin
Guffa6-Oct-06 11:17
Guffa6-Oct-06 11:17 
GeneralRe: bug in XmlReader ? Pin
Chris Losinger6-Oct-06 11:31
professionalChris Losinger6-Oct-06 11:31 
GeneralRe: bug in XmlReader ? Pin
Guffa6-Oct-06 12:18
Guffa6-Oct-06 12:18 
GeneralRe: bug in XmlReader ? Pin
Chris Losinger6-Oct-06 12:31
professionalChris Losinger6-Oct-06 12:31 
GeneralRe: bug in XmlReader ? Pin
Guffa6-Oct-06 13:17
Guffa6-Oct-06 13:17 
GeneralRe: bug in XmlReader ? Pin
Chris Losinger6-Oct-06 16:42
professionalChris Losinger6-Oct-06 16:42 
GeneralRe: bug in XmlReader ? Pin
Guffa7-Oct-06 1:47
Guffa7-Oct-06 1:47 
GeneralRe: bug in XmlReader ? Pin
Chris Losinger7-Oct-06 3:50
professionalChris Losinger7-Oct-06 3:50 
GeneralRe: bug in XmlReader ? Pin
Colin Angus Mackay10-Oct-06 1:05
Colin Angus Mackay10-Oct-06 1:05 
AnswerRe: bug in XmlReader ? [modified] Pin
Dave Kreskowiak6-Oct-06 4:39
mveDave Kreskowiak6-Oct-06 4:39 
GeneralRe: bug in XmlReader ? Pin
Chris Losinger6-Oct-06 4:55
professionalChris Losinger6-Oct-06 4:55 
QuestionConvert a collection into a list?? Pin
roxuca5-Oct-06 4:39
roxuca5-Oct-06 4:39 
AnswerRe: Convert a collection into a list?? Pin
Robert Rohde9-Oct-06 22:33
Robert Rohde9-Oct-06 22:33 
QuestionComplier Error Question Pin
Beringer5-Oct-06 3:42
Beringer5-Oct-06 3:42 

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.