VSWebSite.GetUniqueFilename 方法

使用指定的根名称和文件扩展名返回在指定文件夹内唯一的文件名。

命名空间:  VsWebSite
程序集:  VsWebSite.Interop(在 VsWebSite.Interop.dll 中)

语法

声明
Function GetUniqueFilename ( _
    bstrFolder As String, _
    bstrRoot As String, _
    bstrDesiredExt As String _
) As String
string GetUniqueFilename(
    string bstrFolder,
    string bstrRoot,
    string bstrDesiredExt
)
String^ GetUniqueFilename(
    [InAttribute] String^ bstrFolder, 
    [InAttribute] String^ bstrRoot, 
    [InAttribute] String^ bstrDesiredExt
)
abstract GetUniqueFilename : 
        bstrFolder:string * 
        bstrRoot:string * 
        bstrDesiredExt:string -> string 
function GetUniqueFilename(
    bstrFolder : String, 
    bstrRoot : String, 
    bstrDesiredExt : String
) : String

参数

  • bstrFolder
    类型:System.String
    文件夹的相对路径,此文件夹内的文件名必须是唯一的。使用“/”作为路径分隔符;请勿在文件夹名称的开头或结尾使用“/”字符。
  • bstrRoot
    类型:System.String
    此文件的基名称,例如“default”或“HomePage”。
  • bstrDesiredExt
    类型:System.String
    此文件的扩展名,包括点号,例如“.aspx”或“.xml”。

返回值

类型:System.String
一个带有扩展名的文件名称,该文件名在指定文件夹内是唯一的。

.NET Framework 安全性

请参见

参考

VSWebSite 接口

VsWebSite 命名空间

EnvDTE

其他资源

引用自动化程序集和 DTE2 对象