Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 705 Bytes

RR0203.md

File metadata and controls

40 lines (29 loc) · 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)