RandomAccess.SetLength(SafeFileHandle, Int64) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the length of the file to the given value.
public:
static void SetLength(Microsoft::Win32::SafeHandles::SafeFileHandle ^ handle, long length);
C#
public static void SetLength(Microsoft.Win32.SafeHandles.SafeFileHandle handle, long length);
static member SetLength : Microsoft.Win32.SafeHandles.SafeFileHandle * int64 -> unit
Public Shared Sub SetLength (handle As SafeFileHandle, length As Long)
- handle
- SafeFileHandle
The file handle.
- length
- Int64
The length of the file in bytes.
handle
is null
.
handle
is invalid.
The file is closed.
The file does not support seeking (pipe or socket).
length
is negative.
Продукт | Версии |
---|---|
.NET | 7, 8, 9, 10 |
Работете съвместно с нас в GitHub
Източникът за това съдържание може да бъде намерен в GitHub, където можете също да създавате и преглеждате проблеми и да изтегляте искания. За повече информация вижте нашето ръководство за сътрудник.
Обратна връзка за .NET
.NET е проект с отворен код. Изберете връзка, за да предоставите обратна връзка: