XmlnsDictionary.Add 方法

定义

将一个前缀 URI 对添加到此 XmlnsDictionaryAdds a prefix-URI pair to this XmlnsDictionary.

重载

Add(Object, Object)

将一个前缀 URI 对添加到此 XmlnsDictionaryAdds a prefix-URI pair to this XmlnsDictionary.

Add(String, String)

将一个前缀 URI 对添加到此 XmlnsDictionaryAdds a prefix-URI pair to this XmlnsDictionary.

Add(Object, Object)

将一个前缀 URI 对添加到此 XmlnsDictionaryAdds a prefix-URI pair to this XmlnsDictionary.

public:
 virtual void Add(System::Object ^ prefix, System::Object ^ xmlNamespace);
public void Add (object prefix, object xmlNamespace);
abstract member Add : obj * obj -> unit
override this.Add : obj * obj -> unit
Public Sub Add (prefix As Object, xmlNamespace As Object)

参数

prefix
Object

要添加的 XAML 命名空间前缀。The prefix of the XAML namespace to be added.

xmlNamespace
Object

前缀所映射到的 XAML 命名空间 URI。The XAML namespace URI the prefix maps to.

实现

异常

prefixxmlNamespace 不是字符串。prefix or xmlNamespace is not a string.

prefixxmlNamespacenullprefix or xmlNamespace is null.

注解

初始类型检查后,此实现将转发到类型安全的方法XmlnsDictionary.AddAfter initial type-checking, this implementation forwards to the type-safe method XmlnsDictionary.Add.

Add(String, String)

将一个前缀 URI 对添加到此 XmlnsDictionaryAdds a prefix-URI pair to this XmlnsDictionary.

public:
 void Add(System::String ^ prefix, System::String ^ xmlNamespace);
public void Add (string prefix, string xmlNamespace);
member this.Add : string * string -> unit
Public Sub Add (prefix As String, xmlNamespace As String)

参数

prefix
String

此 XML 命名空间的前缀。The prefix of this XML namespace.

xmlNamespace
String

前缀所映射到的 XML 命名空间 URI。The XML namespace URI the prefix maps to.

异常

prefixxmlNamespacenullprefix or xmlNamespace is null.

适用于