共用方式為


DocData.RenameDocData Method

Renames a document and resets its position in the hierarchy.

Namespace:  Microsoft.VisualStudio.Modeling.Shell
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.10.0.dll)

Syntax

'宣告
Public Function RenameDocData ( _
    attributes As UInteger, _
    hierarchy As IVsHierarchy, _
    itemId As UInteger, _
    fileName As String _
) As Integer
public int RenameDocData(
    uint attributes,
    IVsHierarchy hierarchy,
    uint itemId,
    string fileName
)
public:
virtual int RenameDocData(
    unsigned int attributes, 
    IVsHierarchy^ hierarchy, 
    unsigned int itemId, 
    String^ fileName
) sealed
abstract RenameDocData : 
        attributes:uint32 * 
        hierarchy:IVsHierarchy * 
        itemId:uint32 * 
        fileName:string -> int 
override RenameDocData : 
        attributes:uint32 * 
        hierarchy:IVsHierarchy * 
        itemId:uint32 * 
        fileName:string -> int 
public final function RenameDocData(
    attributes : uint, 
    hierarchy : IVsHierarchy, 
    itemId : uint, 
    fileName : String
) : int

Parameters

  • fileName
    Type: System.String
    The new file name for the document.

Return Value

Type: System.Int32
S_OK if the method succeeds; otherwise, it returns an error code.

Implements

IVsPersistDocData2.RenameDocData(UInt32, IVsHierarchy, UInt32, String)
IVsPersistDocData.RenameDocData(UInt32, IVsHierarchy, UInt32, String)

Remarks

This method implements the IVsPersistDocData2 interface.

.NET Framework Security

See Also

Reference

DocData Class

Microsoft.VisualStudio.Modeling.Shell Namespace