RCS1224: Make method an extension method
Properties
Property | Value |
---|---|
Default Severity | Info |
Minimum language version | - |
Summary
Public/internal method in public/internal static class whose name ends with "Extensions" should be an extension method.
Examples
Example #1
diagnostic.cs
public static class FooExtensions
{
public static string Bar(Foo foo)
{
}
}
fix.cs
public static class FooExtensions
{
public static string Bar(this Foo foo)
{
}
}