Address properties in formulas
Many address properties are in the localized address interfaces, such as IUSAddress
, rather than the global address interface (IAddress
). Properties that are not in the global interface must be cast to your local address interface.
For example, this code sample can be used to cast the StreetName
and Suffix
properties to IUSAddress
:
dim unitedStatesAddress as Hansen.Property.IUSAddress
unitedStatesAddress = CType(oServiceRequestLog.ServiceRequest.Address,
Hansen.Property.IUSAddress)
dim streetName as string = unitedStatesAddress.StreetName
dim suffix as string = unitedStatesAddress.Suffix.Code
dim res as Hansen.Core.Result = new Result(0, ResultSeverity.UserError,
"street name =" & streetName & "suffix =" & suffix)
return res