CodeRush Classic shows the Extern member cannot declare a body code issue if an extern member declares a body.

Fix
Remove the extern method body.

Purpose
Highlights the extern method declaration statements, which would cause the Cannot be extern and declare a body compilation error.

Example
C# |
[DllImport("user32.dll")]
static extern int <-:caret:->DrawText(IntPtr hDC, string lpString, int nCount, ref Rect lpRect, uint uFormat)
{
}
|
Fix:
C# |
[DllImport("user32.dll")]
static extern int DrawText(IntPtr hDC, string lpString, int nCount, ref Rect lpRect, uint uFormat);
|