Share via


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:

.NET Framework Security

See Also

Reference

FileInfo Class

System.IO Namespace