Permalink
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (29 sloc) 705 Bytes

Extract event handler method

Property Value
Id RR0203
Title Extract event handler method
Syntax lambda expression
Enabled by Default

Usage

Before

void Foo()
{
  x.Changed += (s, e) => Bar();
}

After

void Foo()
{
  x.Changed += Changed;
}

void OnChanged(object sender, EventArgs e)
{
  Bar();
}

See Also

(Generated with DotMarkdown)