Skip to main content
 Collapse AllExpand All      Code: All Code: Multiple Code: Visual Basic Code: C# Code: Visual C++ Code: F# Code: JScript 
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)
Public ReadOnly Property Length As Long
public long Length { get; }
property long long Length {
	long long get ();
member Length : int64
function get Length () : long

Property Value

Type: System..::..Int64
The size of the current file in bytes.

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: