Length Property
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets the size, in bytes, of the current file.
Namespace: System.IO
Assembly: System.IO (in System.IO.dll)
Syntax
'Declaration
Public ReadOnly Property Length As Long
public long Length { get; }
public:
property long long Length {
long long get ();
}
member Length : int64 with get
function get Length () : long
Property Value
Type: System. . :: . .Int64
The size of the current file in bytes.
Remarks
The value of the Length property is pre-cached if the current instance of the FileInfo object was returned from any of the following DirectoryInfomethods:
GetFileSystemInfos
EnumerateDirectories
EnumerateFiles
EnumerateFileSystemInfos
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.