FileType Property
TOC
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

FileType Property

Visual Studio .NET 2003

Sets or returns the type of file.

[Visual Basic .NET]
Public Property FileType() As eFileType
[Visual Basic 6]
Property Get FileType() As eFileType
Property Let FileType( _
   ByVal NewValue As eFileType _
) 
[C++]
HRESULT __stdcall get_FileType(
   /* [out, retval] */ eFileType* retVal
);
HRESULT __stdcall put_FileType(
   /* [in] */ eFileType NewValue
);
[C#]
public eFileType FileType {get; set;}
[JScript .NET]
public function get FileType() : eFileType
public function set FileType(
   NewValue : eFileType
)

Parameters

NewValue
The new value. A eFileType value.

Return Value

Returns a eFileType value.

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("File type: " & file.FileType.ToString)
        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:
© 2016 Microsoft