Condividi tramite


ITextDocument.Rename Method

Rename the document to the given new file path.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

Syntax

'Declaration
Sub Rename ( _
    newFilePath As String _
)
void Rename(
    string newFilePath
)
void Rename(
    String^ newFilePath
)
abstract Rename : 
        newFilePath:string -> unit
function Rename(
    newFilePath : String
)

Parameters

  • newFilePath
    Type: String

    The new file path for this document.

Exceptions

Exception Condition
InvalidOperationException

This object is in the middle of raising events.

ObjectDisposedException

This object has been disposed.

.NET Framework Security

See Also

Reference

ITextDocument Interface

Microsoft.VisualStudio.Text Namespace