Version

Add(ContextMenuItem) Method

Adds the specified item to the end of the collection.
Syntax
'Declaration
 
Public Overloads Function Add( _
   ByVal value As ContextMenuItem _
) As Integer
public int Add( 
   ContextMenuItem value
)

Parameters

value
The ContextMenuItem to add to the end of the collection.

Return Value

An System.Int32 representing the zero-based index of the new item in the collection.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionThe value parameter is null.
System.ArgumentOutOfRangeExceptionThe specified item already belongs to another collection.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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