Share via


SPWeb.GetFile method (Guid)

Gets the file object with the specified identifier (ID).

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function GetFile ( _
    uniqueId As Guid _
) As SPFile
'Usage
Dim instance As SPWeb
Dim uniqueId As Guid
Dim returnValue As SPFile

returnValue = instance.GetFile(uniqueId)
public SPFile GetFile(
    Guid uniqueId
)

Parameters

  • uniqueId
    Type: System.Guid

    The ID of the file object.

Return value

Type: Microsoft.SharePoint.SPFile
The file object.

Remarks

This method calls the SPFile constructor with this and uniqueId.

See also

Reference

SPWeb class

SPWeb members

GetFile overload

Microsoft.SharePoint namespace