Downsides to starting a thread in the same context using an anonymous delegate
<p>So the following code is possible in C# to start a new thread in a method:</p>

<pre><code>int myInt;
new Thread(delegate() {
    // yeah, I'm in a separate thread! And I can access myInt as well, awesome
}).Start();
</code></pre>

<p>and all your local variables in that scope are also available in that thread. I've used this in times where I need to perform small calculations "on the side" instead of creating small methods and starting them as threads instead, so I find it quite useful, even if it's not that pretty always.</p>

<p>Recently I also got in the situation where I needed to break of a <em>long going</em> thread that needed 5 variables from the calling method, and it got me wondering whether or not this was "good coding" considering both scopes need references to the local variables.</p>

<p>I am therefore wondering if it is better to create a new class (something in the lines of <code>SpecificContext</code>) and pass that as an object to a Thread using the <code>ParameterizedThreadStart</code> delegate or if this design is actually considered as "best practice" since we kind of get type checking of the variables? Also, are there any downsides to using one approach over the other, in both design and/or performance?</p>
