← back to index

S3860 — "ByVal" should not be used

Language: VB.NET  |  Type: CODE_SMELL  |  Severity: Minor

Tags: clumsy

Why is this an issue?

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.

Noncompliant code example

Sub Foo(ByVal bar As String)
  ' ...
End Sub

Compliant solution

Sub Foo(bar As String)
  ' ...
End Sub