finding file size  
Author Message
ashk1860





PostPosted: Visual C# General, finding file size Top

hi

I need to know the size of the file which I am going to read with a stream. but I can not find any way to have the size of the file.

regards



Visual C#10  
 
 
Prasant Swain





PostPosted: Visual C# General, finding file size Top

you can use the FileInfo Class to get the file size. the length property return the size of the file.

 

FileInfo f = new FileInfo("File Path");

f.Length <- return the size of the file.



 
 
ashk1860





PostPosted: Visual C# General, finding file size Top

thank you very much

it works

regards