2023-05-03 11:06:20 +02:00
== Why is this an issue?
2021-04-28 16:49:39 +02:00
Since Visual Studio 2010 SP1, the ``++ByVal++`` parameter modifier is implicitly applied, and therefore not required anymore. Removing it from your source code will improve readability.
2021-04-28 18:08:03 +02:00
2023-05-03 11:06:20 +02:00
=== Noncompliant code example
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,vbnet]
2021-04-28 16:49:39 +02:00
----
Sub Foo(ByVal bar As String)
' ...
End Sub
----
2021-04-28 18:08:03 +02:00
2023-05-03 11:06:20 +02:00
=== Compliant solution
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,vbnet]
2021-04-28 16:49:39 +02:00
----
Sub Foo(bar As String)
' ...
End Sub
----
2021-04-28 18:08:03 +02:00
2021-06-02 20:44:38 +02:00
2021-06-03 09:05:38 +02:00
ifdef::env-github,rspecator-view[]
2021-09-20 15:38:42 +02:00
'''
== Implementation Specification
(visible only on this page)
2023-05-25 14:18:12 +02:00
=== Message
Remove this redundant "ByVal" modifier
=== Highlighting
``++ByVal++``
2021-09-20 15:38:42 +02:00
2021-06-08 15:52:13 +02:00
'''
2021-06-02 20:44:38 +02:00
== Comments And Links
(visible only on this page)
2023-05-25 14:18:12 +02:00
=== on 26 Jan 2017, 13:51:17 Valeri Hristov wrote:
References:
Parameter Arrays - \https://msdn.microsoft.com/en-us/library/538f81ec.aspx
Parameter List - \https://msdn.microsoft.com/en-us/library/cbs7z96t.aspx (see also in this article Passing Mechanism in the Rules section)
2021-06-03 09:05:38 +02:00
endif::env-github,rspecator-view[]