How to Get File Size in C#/CSharp

How to Get File Size in C#/CSharp

To get file size in C#/CSharp, we make use FileInfo class which resides in System.IO namespace.  Example is given below:

 

  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •