title: Creating an instance using Ninject with additional parameters in the constructor
body: <p>I decided to start using Ninject and face an issue. Say I have the following scenario.
  I have an <code>IService</code> interface and 2 classes implementing this interface. And also I have a class, which has a constructor getting IService and an <strong>int</strong>. How can I create an instance of this class with Ninject (I dont want to hardwire this int, I want to pass it every time I get an instance)?</p>
  
  <p>Here's some code illustrating the situation:</p>
  
  <pre><code>interface IService
  {
      void Func();
  }
  
  class StandardService : IService
  {
      public void Func()
      {
          Console.WriteLine("Standard");
      }
  }
  
  class AlternativeService : IService
  {
      public void Func()
      {
          Console.WriteLine("Alternative");
      }
  }
  
  
  class MyClass
  {
      public MyClass(IService service, int i)
      {
          this.service = service;
      }
  
      public void Func()
      {
          service.Func();
      }
  
      IService service = null;
  }
  class Program
  {
      static void Main(string[] args)
      {
          IKernel kernel = new StandardKernel(new InlineModule(
              x =&gt; x.Bind&lt;IService&gt;().To&lt;AlternativeService&gt;(),
              x =&gt; x.Bind&lt;MyClass&gt;().ToSelf()));
  
          IService service = kernel.Get&lt;IService&gt;();
  
          MyClass m = kernel.Get&lt;MyClass&gt;();
          m.Func();
      }
  }
  </code></pre>