SubType Property
Collapse the table of content
Expand the table of content

SubType Property

Visual Studio .NET 2003

Sets or returns the file's sub-type as understood by the designers.

[Visual Basic .NET]
Public Property SubType() As String
[Visual Basic 6]
Property Get SubType() As String
Property Let SubType( _
   ByVal NewValue As String _
HRESULT __stdcall get_ SubType(
   /* [out, retval] */ BSTR* retVal
HRESULT __stdcall put_ SubType(
   /* [in] */ BSTR NewValue
public string SubType {get; set;}
[JScript .NET]
public function get SubType() : String
public function set SubType(
   NewValue : String


A string representing the file's sub-type.

Return Value

The file's sub-type.


The following sample code uses the RelativePath property in the development environment:

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim file As VCFile
        Dim col As IVCCollection
        Dim idx As Integer
        Dim prj As VCProject
        prj = DTE.Solution.Projects.Item(1).Object
        col = prj.Files
        For idx = 1 To col.Count
            file = col.Item(idx)
            MsgBox("Sub-type: " & file.SubType)
    End Sub
End Module

See Samples for Project Model Extensibility for information on how to compile and run this sample.

See Also

Applies To: VCFile Object

© 2015 Microsoft