VCLanguageManager.ValidateFileName 方法

确定指定的文件名是否是有效的 C++ 文件名。

命名空间:  Microsoft.VisualStudio.VCCodeModel
程序集:  Microsoft.VisualStudio.VCCodeModel(在 Microsoft.VisualStudio.VCCodeModel.dll 中)

语法

声明
Function ValidateFileName ( _
    bstrFile As String, _
    eFileType As vsCMValidateFileExtension _
) As Boolean
bool ValidateFileName(
    string bstrFile,
    vsCMValidateFileExtension eFileType
)
bool ValidateFileName(
    [InAttribute] String^ bstrFile, 
    [InAttribute] vsCMValidateFileExtension eFileType
)
abstract ValidateFileName : 
        bstrFile:string * 
        eFileType:vsCMValidateFileExtension -> bool 
function ValidateFileName(
    bstrFile : String, 
    eFileType : vsCMValidateFileExtension
) : boolean

参数

  • bstrFile
    类型:System.String
    必选。要验证的文件名。

返回值

类型:System.Boolean
true ,如果指定的文件名是有效的 C++ 文件名;否则, false。

.NET Framework 安全性

请参见

参考

VCLanguageManager 接口

Microsoft.VisualStudio.VCCodeModel 命名空间