AttributeCollection.FromExisting Method (AttributeCollection, Attribute[])

 

Creates a new AttributeCollection from an existing AttributeCollection.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

public static AttributeCollection FromExisting(
	AttributeCollection existing,
	params Attribute[] newAttributes
)

Parameters

existing
Type: System.ComponentModel.AttributeCollection

An AttributeCollection from which to create the copy.

newAttributes
Type: System.Attribute[]

An array of type Attribute that provides the attributes for this collection. Can be null.

Return Value

Type: System.ComponentModel.AttributeCollection

A new AttributeCollection that is a copy of existing.

Exception Condition
ArgumentNullException

existing is null.

If the newAttributes parameter is provided, its Attribute entries are merged with those of the existing parameter.

.NET Framework
Available since 2.0
Return to top
Show: