Permalink
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (33 sloc) 985 Bytes

RCS1224: Make method an extension method

Property Value
Id RCS1224
Category Design
Default Severity Info
Enabled by Default
Supports Fade-Out -
Supports Fade-Out Analyzer -

Summary

Public/internal method in public/internal static class whose name ends with "Extensions" should be an extension method.

Example

Code with Diagnostic

public static class FooExtensions
{
    public static string Bar(Foo foo) // RCS1224
    {
    }
}

Code with Fix

public static class FooExtensions
{
    public static string Bar(this Foo foo)
    {
    }
}

See Also

(Generated with DotMarkdown)