To get the size of the file in c#

Posted by Jitendrasoft09 under C# category on | Points: 40 | Views : 783
using System;
using System.IO;

class JkExample {

static void Main(string[] args) {

FileInfo myFile = new FileInfo(@"C:\jkfile.txt");

long fileSize = myFile.Length;
Console.WriteLine("File length: {0} bytes", fileSize);


Comments or Responses

Login to post response