Defining Procedure Arguments
Subroutines and functions generally need additional information to perform their roles correctly. However, passing too many arguments is considered bad form. Reducing the number of arguments can be accomplished by introducing a parameter object; refer to the section “Refactoring: Introduce Parameter Object” for an explanation of this refactoring.
You are trying to achieve multiple objectives when defining procedure arguments:
- The specifier you use should constrain the argument in a manner appropriate for its intended use. For example, immutable arguments should be passed by value with ByVal.
- The names of arguments should use whole words or standard abbreviations. Arguments are generally nouns representing data. ...
Get Visual Basic® .NET Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.