39 lines
819 B
Plaintext
39 lines
819 B
Plaintext
Reserved parameters are unnecessary in VB.NET because method overloading can be used to introduce additional variants over time.
|
|
|
|
|
|
This rule detects parameters which contain ``++reserved++`` in their names.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,text]
|
|
----
|
|
Module Module1
|
|
Function Add(ByVal a As Integer, ByVal b As Integer, ByVal reserved As Integer) As Integer ' Noncompliant
|
|
Return a + b
|
|
End Function
|
|
End Module
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
[source,text]
|
|
----
|
|
Module Module1
|
|
Function Add(ByVal a As Integer, ByVal b As Integer) As Integer ' Compliant
|
|
Return a + b
|
|
End Function
|
|
End Module
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|