ITextDocument.Rename 方法
將文件重新命名為指定的新檔案路徑。
命名空間: Microsoft.VisualStudio.Text
組件: Microsoft.VisualStudio.Text.Data (在 Microsoft.VisualStudio.Text.Data.dll 中)
語法
'宣告
Sub Rename ( _
newFilePath As String _
)
void Rename(
string newFilePath
)
void Rename(
String^ newFilePath
)
abstract Rename :
newFilePath:string -> unit
function Rename(
newFilePath : String
)
參數
newFilePath
類型:String這個文件的新檔案路徑。
例外狀況
例外狀況 | 條件 |
---|---|
InvalidOperationException | 這個物件是引發事件的中間。 |
ObjectDisposedException | 這個物件已經過處置。 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。