New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Collection of attributes for a given object

Definition

Namespace:Telerik.Web.UI.GridExcelBuilder

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class AttributesCollection : IAttributesCollection, IDictionary, ICollection, IEnumerable

Inheritance: objectAttributesCollection

Implements: IAttributesCollectionICollectionIDictionaryIEnumerable

Inherited Members object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

Default Attributes collection constructor

C#
public AttributesCollection()

Constructor for the Attributes collection that accepts IDictionary

C#
public AttributesCollection(IDictionary dictionary)
Parameters:dictionaryIDictionary

IDictionary collection of Attribute objects

Properties

Gets the number of elements contained in the ICollection. (Inherited from ICollection.)

C#
public int Count { get; }

Gets a value indicating whether the collection has a fixed size.

C#
public bool IsFixedSize { get; }

Gets a value indicating whether the collection is read-only.

C#
public bool IsReadOnly { get; }

Gets a value indicating whether access to the ICollection is synchronized (thread safe). (Inherited from ICollection.)

C#
public bool IsSynchronized { get; }

Gets an ICollection object containing the keys of the collection.

C#
public ICollection Keys { get; }

Gets an object that can be used to synchronize access to the ICollection. (Inherited from ICollection.)

C#
public object SyncRoot { get; }

Returns the attribute located at the corresponding position

C#
public string this[string key] { get; set; }
Parameters:keystring

Attribute index

Property Value:

Attribute object

Implements: IAttributesCollection.this[string]

Gets an ICollection object containing the values in the collection.

C#
public ICollection Values { get; }

Methods

Add an Attribute to the collection

C#
public void Add(string key, string value)
Parameters:keystringvaluestring

Implements: IAttributesCollection.Add(string, string)

Clears the Attribute collection

C#
public void Clear()

Determines whether the collection contains an element with the specified key.

C#
public bool Contains(string key)
Parameters:keystring

The key to locate in the collection.

Returns:

bool

true if the collection contains an element with the key; otherwise, false.

Implements: IAttributesCollection.Contains(string)

Copies the elements of the ICollection to an Array, starting at a particular Array index. (Inherited from ICollection.)

C#
public void CopyTo(string[] array, int index)
Parameters:arraystring[]

The one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing.

indexint

The zero-based index in array at which copying begins.

Implements: IAttributesCollection.CopyTo(string[], int)

Returns an IDictionaryEnumerator object for the IDictionary object.

C#
public IDictionaryEnumerator GetEnumerator()
Returns:

IDictionaryEnumerator

An IDictionaryEnumerator object for the IDictionary object.

Removes the element with the specified key from the collection.

C#
public void Remove(string key)
Parameters:keystring

The key of the element to remove.

Implements: IAttributesCollection.Remove(string)