Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Gets a value indicating whether the VCCodeClass object is a template.
Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)
Syntax
'Declaration
ReadOnly Property IsTemplate As Boolean
Get
bool IsTemplate { get; }
property bool IsTemplate {
bool get ();
}
abstract IsTemplate : bool
function get IsTemplate () : boolean
Property Value
Type: System.Boolean
true if the VCCodeClass object is a template; otherwise, false.
Remarks
See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.
Examples
This example adds a class, as well as a template parameter to that class, and then displays the value returned by IsTemplate.
[Visual Basic]
Sub IsTemplateClass()
Dim vcCM As VCCodeModel
Dim vcClass As VCCodeClass
vcCM = DTE.Solution.Item(1).CodeModel
vcClass = vcCM.AddClass("MyTemplateClass", "MyTemplateClass.h")
vcClass.StartPoint().CreateEditPoint().Insert("template <class T> ")
vcCM.Synchronize()
MsgBox(vcClass.IsTemplate.ToString())
End Sub
.NET Framework Security
- 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.