title: How to dispose an object created by class FileInfo?
body: <p>I am using a </p>
  
  <pre><code>FileInfo
  </code></pre>
  
  <p>class to get the length of the file as follows:</p>
  
  <pre><code>FileInfo infoFile = new FileInfo(@"C:\Text12341234");
  long configFileLength = infoFile.Length;
  </code></pre>
  
  <p>I want to dispose the object created by </p>
  
  <pre><code>FileInfo 
  </code></pre>
  
  <p>class.
  I am getting an error that "File has been already in use by another process."
  How can i do this? </p>