Export (0) Print
Expand All
Expand Minimize

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 _
) 
[C++]
HRESULT __stdcall get_ SubType(
   /* [out, retval] */ BSTR* retVal
);
HRESULT __stdcall put_ SubType(
   /* [in] */ BSTR NewValue
);
[C#]
public string SubType {get; set;}
[JScript .NET]
public function get SubType() : String
public function set SubType(
   NewValue : String
)

Parameters

NewValue
A string representing the file's sub-type.

Return Value

The file's sub-type.

Example

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)
        Next
    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

Show:
© 2014 Microsoft