title: C# Pass a Class as a parameter
body: <p>I have an Interface, that has some methods</p>
  
  <pre><code>interface IFunction
  {
      public double y(double x);
  
      public double yDerivative(double x);
  }
  </code></pre>
  
  <p>and I've got <strong>static</strong> classes, that are implementing it.</p>
  
  <pre><code>static class TemplateFunction:IFunction
  {
      public static double y(double x)
      {
          return 0;
      }
  
      public static double yDerivative(double x)
      {
          return 0;
      }
  }
  </code></pre>
  
  <p>I want to pass this classes as a parameter to another function.</p>
  
  <pre><code> AnotherClass.callSomeFunction(TemplateFunction);
  </code></pre>
  
  <p>And some other class that catches the request</p>
  
  <pre><code>class AnotherClass
  {
      IFunction function;
      public void callSomeFunction(IFunction function)
      {
          this.fuction = function;
      }
  }
  </code></pre>
  
  <p>Well, it doesn't work... I've tried to use the Type expression, but that seams to break the idea of using an interface. Does anyone have an idea, how to correct the code? </p>