XmlTextReader object copying

  • Thread starter Thread starter lucoto
  • Start date Start date
L

lucoto

Hi,
Can anyone explain me how to copy a XmlTextReader object instead of
copying a reference to it? I tried to use MemberwiseClone() method but
it doesn't make a deep-copy as well.. and ICloneable interface is not
inherited by XmlTextReader class. Hopefully there are some other ways
to do it but I'm quite new to c# programming so any advice will be
helpful :)

Thanks in advance,
Greetings,
Lukasz
 
Can anyone explain me how to copy a XmlTextReader object instead of
copying a reference to it? I tried to use MemberwiseClone() method but
it doesn't make a deep-copy as well.. and ICloneable interface is not
inherited by XmlTextReader class. Hopefully there are some other ways
to do it but I'm quite new to c# programming so any advice will be
helpful :)

Could you explain a little bit about what you actually want to achieve?
Normally I'd just suggest creating two XmlTextReaders from the same
source data, but it really depends on what you want to do.

Jon
 
Vincent said:
Why would you want to have two XmlTextReaders on the same data?

I could imagine situations where the data might have two lists that you
want to work through in parallel, or something similar. I guess we'll
have to wait to see what the OP is really after though...

Jon
 
Good point, more than one way to do everything.
I could imagine situations where the data might have two lists that you
want to work through in parallel, or something similar. I guess we'll
have to wait to see what the OP is really after though...

Jon
 
Back
Top