Answers for "c# get file size in bytes"

C#
4

c# get file size in bytes

long _fileSize = new System.IO.FileInfo(filePath).Length;
Posted by: Guest on January-13-2021
3

C# get size of file

// Get the information about a file
FileInfo fi = new FileInfo(file);
// Print the file size to console
Console.WriteLine($"File size: {fi.Length} bytes");
Posted by: Guest on July-30-2020

C# Answers by Framework

Browse Popular Code Answers by Language