class A
{
private void Foo()
{
string b = null;
new Thread((ThreadStart)delegate { b = ""; }).Start();
WaitForString(ref b);
}
private void WaitForString(ref string b)
{
while (b==null)
{ Thread.Sleep(1000); }
}
}
Too bad, in most cases it does look like a useful refactor. Can it be categorized as a different class of hint ? (something to urge the developer to pay more attention when he applies it)
class A { private void Foo() { string b = null; new Thread((ThreadStart)delegate { b = ""; }).Start(); WaitForString(ref b); } private void WaitForString(ref string b) { while (b==null) { Thread.Sleep(1000); } } }Too bad, in most cases it does look like a useful refactor. Can it be categorized as a different class of hint ? (something to urge the developer to pay more attention when he applies it)