TagBuilder.MergeAttribute 方法

定義

多載

MergeAttribute(String, String)

將屬性新增至標記。

MergeAttribute(String, String, Boolean)

新增屬性,或選擇性地取代開啟標記中的現有屬性。

MergeAttribute(String, String)

將屬性新增至標記。

public void MergeAttribute (string key, string value);
member this.MergeAttribute : string * string -> unit
Public Sub MergeAttribute (key As String, value As String)

參數

key
String

屬性的索引鍵。

value
String

屬性的值。

適用於

MergeAttribute(String, String, Boolean)

新增屬性,或選擇性地取代開啟標記中的現有屬性。

public void MergeAttribute (string key, string value, bool replaceExisting);
member this.MergeAttribute : string * string * bool -> unit
Public Sub MergeAttribute (key As String, value As String, replaceExisting As Boolean)

參數

key
String

屬性的索引鍵。

value
String

屬性的值。

replaceExisting
Boolean

如果具有指定 key 值的屬性存在,則為 true,則取代現有的屬性,否則為 false,使原始屬性保持不變。

適用於