Version

Add(NamedReference) Method

Adds an existing named reference into the collection.
Syntax
'Declaration
 
Public Overloads Function Add( _
   ByVal namedReference As NamedReference _
) As Integer
public int Add( 
   NamedReference namedReference
)

Parameters

namedReference
The named reference instance to add to this collection.

Return Value

Returns the index of the NamedReference added into the collection.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionThrown when namedReference is null (or Nothing in Visual Basic .NET).
System.InvalidOperationExceptionThrown when the namedReference already has a ParentCollection. It is invalid for namedReference to belong to more than one NamedReferencesCollection at any time, or to be added to the same collection multiple times.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also