Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 756 Bytes

RCS1224.md

File metadata and controls

42 lines (30 loc) · 756 Bytes

RCS1224: Make method an extension method

Property Value
Id RCS1224
Category Design
Severity Info

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)