For example if I have code like this
Private Function getCompleteAddress(ByVal sCountryCode as String, ByVal sStateCode as
String, ByVal sCityCode as String) as String
If sCountryCode ="US"
If StateCode = "AL"
If CitiCode = "BHM"
getCompleteAddress=AddressBook.USALBHM
End If
ElseIf StateCode = "WA"
If CitiCode = "SEA"
getCompleteAddress=AddressBook.USWASEA
End If
ElseIf StateCode = "ME"
If CitiCode = "PWM"
getCompleteAddress=AddressBook.USMEPWM
End If
ElseIf StateCode = "PA"
If CitiCode = "PHL"
getCompleteAddress=AddressBook.USPAPHL
End If
ElseIf
......
ElseIf
......
End Function
I want the code to looks like this
Private Function getCompleteAddress(ByVal sCountryCode as String, ByVal sStateCode as
String, ByVal sCityCode as String)
Dim sCombinedCode as String = sCountryCode + sStateCode + CityCode
getCompleteAddress = AddressBook.sCominedCode
End Function
Is it possible? Please note sCombinedCode is not a member of AddressBook it is just a way I imagined of to produce short cleaner code.