title: Does copying objects reduce the performance?
body: <p>First of all, I don't know if this is called "copying" an object, so the question title may be wrong. What I have is a custom class called File which has inside a bunch of lists (1000+ numbers in 5-6 lists) and some other properties. I have all my files in a List to be able to access them (LoadedFiles).</p>
  
  <p>My question is: if I'm writing a method and I don't want to write:</p>
  
  <pre><code>DoSomeOperation(LoadedFiles[2]);
  </code></pre>
  
  <p>but instead:</p>
  
  <pre><code>File file2 = new File();
  file2 = LoadedFiles[2];
  
  DoSomeOperation(file2);
  </code></pre>
  
  <p>Is this a bad practice? Or the compiler is clever enough to know that it's the same object and access it directly from the original list (LoadedFiles).</p>