Is reading from an XmlDocument object thread safe?

前端 未结 4 784
逝去的感伤
逝去的感伤 2020-12-11 08:08

I was wondering if i could safely read from an XmlDocument object using SelectNodes() and SelectSingleNode() from multiple threads with no problems. MSDN says that they are

4条回答
  •  不思量自难忘°
    2020-12-11 08:13

    SelectNodes / SelectSingleNode should be safe (they only read data). Of course you need to synchronize those with any method that actually modifies the xml.

提交回复
热议问题