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
{
// ...
}
}