XmlnsDictionary.Seal 方法

定义

锁定字典,使其无法进行更改。Locks the dictionary so that it cannot be changed.

public:
 void Seal();
public void Seal ();
member this.Seal : unit -> unit
Public Sub Seal ()

注解

必须先完成此操作,然后XmlnsDictionary才能将设置为属性(通常ParserContext在上)。This must be done before setting the XmlnsDictionary to a property (typically on a ParserContext). 如果尝试在密封后XmlnsDictionary修改字典,将InvalidOperationException引发。Attempting to modify the dictionary after the XmlnsDictionary is sealed throws an InvalidOperationException.

适用于