All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.plugins.csharp.S4225.html Maven / Gradle / Ivy

There is a newer version: 10.2.0.105762
Show newest version

Why is this an issue?

Creating an extension method that extends object is not recommended because it makes the method available on every type. Extensions should be applied at the most specialized level possible, and that is very unlikely to be object.

Noncompliant code example

public static class MyExtensions
{
    public static void SomeExtension(this object obj) // Noncompliant
    {
        // ...
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy