title: How to mock class members in C#?
body: <p>I'm trying to use FakeItEasy to mock an object that is a member of a C# class I'm creating.</p>
  
  <p>The FakeItEasy documentation indicates that you fake an object in a way similar to this: </p>
  
  <pre><code>private static var m_physics = A.Fake&lt;IPhysics&gt;();
  </code></pre>
  
  <p>That is, using the "var" keyword.</p>
  
  <p>However, in this case the C# compiler doesn't like the fact that <strong>var</strong> is being used in a non-local context.  I get this error:</p>
  
  <p><em>The contextual keyword 'var' may only appear within a local variable declaration</em></p>
  
  <p>Can't I mock an object that's not local?</p>