This documentation is archived and is not being maintained.

IsTemplate Property

Visual Studio .NET 2003

Determines if the parent object is a template.

[Visual Basic .NET]
Public ReadOnly Property IsTemplate() As Boolean
[Visual Basic 6]
Property Get IsTemplate() As Boolean
HRESULT __stdcall get_IsTemplate(
   /* [out, retval] */ VARIANT_BOOL* retVal
public bool IsTemplate {get;}
[JScript .NET]
public function get IsTemplate() : Boolean


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> ")
End Sub

See Visual C++ Code Model Samples for information on how to compile and run this sample.

See Also

Applies To: VCCodeClass Object | VCCodeFunction Object | VCCodeStruct Object | VCCodeUnion Object