Search notes:

System.IO.FileStream (class)

System.IO.FileStream derives from System.IO.Stream

Length

The Length property returns the size of a file in bytes:
using System;
using System.IO;

class Prg {
   static void Main() {
      FileStream fs = new FileStream("Length.cs", FileMode.Open, FileAccess.Read);
      Console.WriteLine($"Size of {fs.Name} is {fs.Length} bytes");
   }
}
Github repository .NET-API, path: /System/IO/FileStream/Length.cs
Of course, there is a more suitable Length property in System.IO.FileInfo.

See also

System.IO.FileAccess, System.IO.FileMode
The methods Create() and Open() of the System.IO.FileInfo class.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Microsof...', 1758796510, '216.73.216.41', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Microsoft/dot-net/namespaces-classes/System/IO/FileStream/index(57): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78