Manish Jain

Manish Jain

  • NA
  • 102
  • 3k

How to dispose an object created by FileInfo class

Oct 13 2014 5:03 AM
I am using a FileInfo class to get the length of the file as follows:
FileInfo infoFile = new FileInfo(configFile);
long configFileLength = infoFile.Length;
 
here configFile is the path of the file.
 
I want to dispose the object infoFile.
How can i do this? 

Answers (1)