我经常想知道。就编写函数时的“最佳实践”而言,无论是在本地还是在模块/类中,最好使用:
Public Function WhichIsBetter(ByVal tmpUser As String, _
tmpPassword As String) As Boolean
'Do something
End Function
或者
Public Class User
Public Property tmpUser As String
Public Property tmpPassword As String
End Class
Public Function WhichIsBetter(ByVal tmpUser As User) As Boolean
'Do something
End Function