
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
20 lines
527 B
Plaintext
20 lines
527 B
Plaintext
== 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
|
|
|
|
[source,vbnet]
|
|
----
|
|
Imports System.Runtime.CompilerServices
|
|
|
|
Module MyExtensions
|
|
<Extension>
|
|
Sub SomeExtension(obj As Object) ' Noncompliant
|
|
' ...
|
|
End Sub
|
|
End Module
|
|
----
|
|
|
|
include::../rspecator.adoc[]
|