0

System.Xml.XmlElement属性と子を変更できないように、読み取り専用を簡単に返すことはできますか?

XmlNode.IsReadOnlyを使用することをお勧めします。例えば、

System.Xml.XmlElement xml = ...;
//this line does not compile because the IsReadOnly property is read only
xml.IsReadOnly = true; 
return xml;
4

1 に答える 1

0

いいえ、この動作を公開するには、独自のクラス/構造体にラップする必要があります。

于 2012-08-13T11:05:05.000 に答える