Better use on the name of variables
- by Cuartico
I have a method that looks like this:
Public Function NormalizeStreetAddress(country As Namespace.Country,
streetAddress As Namespace.StreetAddress) _
As Namespace.StreetAddress
Dim _streetAddress As New Namespace.StreetAddress = streetAddress
If My.Settings.Streeteable = True Then
Dim _AddressCustom As New Namespace.AddressCustom
_streetAddress = _AddressCustom.NormalizeStreetAddress(country, streetAddress)
End If
Return _streetAddress
End Function
I receive a streetAddress object, but inside the method I need to use another streetAddress object which I called _streetAddress — is that following the standard? A friend of mine told me that object names such as _yourNameObject are for global variables, but I can't find info about this and I want to make this method more readable.