Why there is no local variable capture? C# closure bahavior
<p>I wrote this convert code in a IMultiValueConverter</p>

<pre><code>public object Convert(object[] values ...)
{
   return new Microsoft.Practices.Composite.Presentation.Commands.DelegateCommand&lt;object&gt;(
                delegate
                {
                    foreach (ICommand cmd in values)
                    {
                        cmd.Execute(null);
                    }
                });
}
</code></pre>

<p>values parameters were two command objects, but when the callback executes (WPF mulibinding) values array includes only null values. Why? How to resolve this problem?</p>
