Inspection Details

ImplicitByRefModifier


Summary
Highlights implicit ByRef modifiers in user code.
Reasoning
In modern VB (VB.NET), the implicit modifier is ByVal, as it is in most other programming languages. Making the ByRef modifiers explicit can help surface potentially unexpected language defaults.
The following code example(s) would trigger this inspection:

Public Sub DoSomething(foo As Long)
    foo = 42
End Sub

The following code example(s) would not trigger this inspection:

Public Sub DoSomething(ByRef foo As Long)
    foo = 42
End Sub


Back to List