Share via


ValidationAttributeAdapter<TAttribute>.MergeAttribute 方法

定義

如果 不包含 的值,則加入指定的 keyvalueattributeskeyattributes

protected:
 static bool MergeAttribute(System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ attributes, System::String ^ key, System::String ^ value);
protected static bool MergeAttribute (System.Collections.Generic.IDictionary<string,string> attributes, string key, string value);
static member MergeAttribute : System.Collections.Generic.IDictionary<string, string> * string * string -> bool
Protected Shared Function MergeAttribute (attributes As IDictionary(Of String, String), key As String, value As String) As Boolean

參數

attributes
IDictionary<String,String>

HTML 屬性字典。

key
String

屬性索引鍵。

value
String

屬性值。

傳回

true 如果已加入屬性,則為 ,否則 false 為 。

適用於