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?