This constructor creates a new ProvideMenuResourceAttribute object with the given resource ID and version number.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Syntax
'宣言
Public Sub New ( _
resourceID As Short, _
version As Integer _
)
'使用
Dim resourceID As Short
Dim version As Integer
Dim instance As New ProvideMenuResourceAttribute(resourceID, _
version)
public ProvideMenuResourceAttribute(
short resourceID,
int version
)
public:
ProvideMenuResourceAttribute(
short resourceID,
int version
)
public function ProvideMenuResourceAttribute(
resourceID : short,
version : int
)
Parameters
resourceID
Type: System.Int16The ID of the menu resource. It must match the resource ID used in both the satellite (resource-only) DLL and the Command Table Configuration (.Ctc) Files.
version
Type: System.Int32The version number of the menu resource.
Remarks
The C# language automatically appends the word "Attribute" to the name of any attribute class. In C# code, refer to this attribute as ProvideMenuResource.
Examples
The following C# code applies the ProvideMenuResource attribute to a VSPackage named MyVSPackage.
using Microsoft.VisualStudio.VSIP;
using MSVSIP = Microsoft.VisualStudio.VSIP;
[MSVSIP.Helper.ProvideMenuResource(1000, 1)]
public class MyVSPackage : MSVSIP.Helper.Package {}
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
ProvideMenuResourceAttribute Class