<p>Say I have the following class</p>

<pre><code>MyComponent : IMyComponent {
  public MyComponent(int start_at) {...}
}
</code></pre>

<p>I can register an instance of it with castle windsor via xml as follows</p>

<pre><code>&lt;component id="sample"  service="NS.IMyComponent, WindsorSample" type="NS.MyComponent, WindsorSample"&gt;  
  &lt;parameters&gt;  
    &lt;start_at&gt;1&lt;/start_at &gt;  
  &lt;/parameters&gt;  
&lt;/component&gt;  
</code></pre>

<p>How would I go about doing the exact same thing but in code?  (Notice, the constructor parameter)</p>

You need to pass in an IDictionary when you ask the container for the instance.
You'd use this Resolve overload of the IWindsorContainer:
```
```
T Resolve<T>(IDictionary arguments)
```
```
or the non generic one:
```
```
object Resolve(Type service, IDictionary arguments)
```
```
So, for example: (assuming container is an IWindsorContainer)
```
```
IDictionary<string, object> values = new Dictionary<string, object>();
values["start_at"] = 1;
container.Resolve<IMyComponent>(values);
```
```
Note that the key values in the dictionary are case sensitive.