اقرأ باللغة الإنجليزية

مشاركة عبر


AttributeDictionary Class

Definition

A dictionary for HTML attributes.

C#
public class AttributeDictionary : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,string>>, System.Collections.Generic.IDictionary<string,string>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<string,string>>, System.Collections.Generic.IReadOnlyDictionary<string,string>
Inheritance
AttributeDictionary
Implements

Constructors

Properties

Count

Gets the number of elements contained in the ICollection<T>.

IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

Item[String]

Gets or sets the element with the specified key.

Keys

Gets an ICollection<T> containing the keys of the IDictionary<TKey,TValue>.

Values

Gets an ICollection<T> containing the values in the IDictionary<TKey,TValue>.

Methods

Add(KeyValuePair<String,String>)

Adds an item to the ICollection<T>.

Add(String, String)

Adds an element with the provided key and value to the IDictionary<TKey,TValue>.

Clear()

Removes all items from the ICollection<T>.

Contains(KeyValuePair<String,String>)

Determines whether the ICollection<T> contains a specific value.

ContainsKey(String)

Determines whether the IDictionary<TKey,TValue> contains an element with the specified key.

CopyTo(KeyValuePair<String,String>[], Int32)

Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

GetEnumerator() System.Object.GetEnumerator
Remove(KeyValuePair<String,String>)

Removes the first occurrence of a specific object from the ICollection<T>.

Remove(String)

Removes the element with the specified key from the IDictionary<TKey,TValue>.

TryGetValue(String, String) System.Object.TryGetValue(System.String,System.String@)

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

IEnumerable<KeyValuePair<String,String>>.GetEnumerator()

Returns an enumerator that iterates through the collection.

IReadOnlyDictionary<String,String>.Keys

Gets an enumerable collection that contains the keys in the read-only dictionary.

IReadOnlyDictionary<String,String>.Values

Gets an enumerable collection that contains the values in the read-only dictionary.

Applies to

منتج الإصدارات
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0