Język

RandomAccess.GetLength(SafeFileHandle) Metoda

Definicja

Pobiera długość pliku w bajtach.

public:
 static long GetLength(Microsoft::Win32::SafeHandles::SafeFileHandle ^ handle);
public static long GetLength(Microsoft.Win32.SafeHandles.SafeFileHandle handle);
static member GetLength : Microsoft.Win32.SafeHandles.SafeFileHandle -> int64
Public Shared Function GetLength (handle As SafeFileHandle) As Long

Parametry

handle
SafeFileHandle

Dojście do pliku.

Zwraca

Długa wartość reprezentująca długość pliku w bajtach.

Wyjątki

Parametr handle ma wartość null.

handle jest nieprawidłowy.

Plik jest zamknięty.

Plik nie obsługuje wyszukiwania (potoku lub gniazda).

Dotyczy