Here's the documentation for the method XContainer.CreateWriter:
Creates an XmlWriter that can be used to add nodes to the XContainer.
I parse the text with my mind, I get:
- A method implemented by the class XContainer
- Returns an instance of the class XmlWriter
- The purpose is to add nodes to the instance of the XContainer on which the method is called.
However, I see XmlWriter, and I think of "writing XML". But that contradicts the above purpose in my mind, which is to add nodes. If I'm going to be adding nodes, wouldn't a "reader" be the thing I use to do so?
I'm not claiming anything is wrong other than my confusion here. I'd like assistance in grasping the apropriate metaphor so I can keep this straight in the future.
How is the naming convention used in Readers/Writers related to thier functionality in .NET framework classes?