VCCodeUnion::IsTemplate Property
Visual Studio 2015
Gets whether the object is a template.
Assembly: Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)
See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.
This example adds a class, as well as a template parameter to that class, and then displays the value returned by IsTemplate.
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
Show: