FileInfo.Length Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets the size, in bytes, of the current file.
Assembly: mscorlib (in mscorlib.dll)
| Exception | Condition |
|---|---|
| IOException | Refresh cannot update the state of the file or directory. |
| FileNotFoundException | The file does not exist. -or- The Length property is called for a directory. |
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:
To get the latest value, call the Refresh method.