Share via


IMenuItemCollection.Add Method (String, Int32)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Creates and adds a new menu item instance with the specified text and sort order.

Namespace:  Microsoft.VisualStudio.SharePoint
Assembly:  Microsoft.VisualStudio.SharePoint (in Microsoft.VisualStudio.SharePoint.dll)

Syntax

'Declaration
Function Add ( _
    text As String, _
    sortOrder As Integer _
) As IMenuItem
IMenuItem Add(
    string text,
    int sortOrder
)

Parameters

  • text
    Type: System.String

    The text for the menu item displayed in the context menu.

  • sortOrder
    Type: System.Int32

    A number specifying sort order of the menu item. Default value is 0. To insert the item before the default sort order, specify a negative number. To insert the item after the default sort order, specify a positive number.

Return Value

Type: Microsoft.VisualStudio.SharePoint.IMenuItem
An object representing the menu item added to the collection.

.NET Framework Security

See Also

Reference

IMenuItemCollection Interface

Add Overload

Microsoft.VisualStudio.SharePoint Namespace