VCFile.FileType 属性
获取或设置文件的类型。
命名空间: Microsoft.VisualStudio.VCProjectEngine
程序集: Microsoft.VisualStudio.VCProjectEngine(在 Microsoft.VisualStudio.VCProjectEngine.dll 中)
语法
声明
Property FileType As eFileType
eFileType FileType { get; set; }
property eFileType FileType {
eFileType get ();
void set (eFileType value);
}
abstract FileType : eFileType with get, set
function get FileType () : eFileType
function set FileType (value : eFileType)
属性值
类型:Microsoft.VisualStudio.VCProjectEngine.eFileType
一个 eFileType 值。
备注
有关如何编译和运行此示例的信息,请参见 如何:编译项目模型扩展性示例代码 。
示例
' 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
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。