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)


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

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


  • uniqueId
    Type: System.Guid

    The ID of the file object.

Return value

Type: Microsoft.SharePoint.SPFile
The file object.


This method calls the SPFile constructor with this and uniqueId.

See also


SPWeb class

SPWeb members

GetFile overload

Microsoft.SharePoint namespace