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
Imports System.Runtime.CompilerServices
Module MyExtensions
<Extension>
Sub SomeExtension(obj As Object) ' Noncompliant
' ...
End Sub
End Module