PersonNameFormatter class, located is designed to format the names of person that exists in the database or a name that we specify. This class contains the following methods.
Primary methods
Additional methods
GetFormalName method is an extension method used to get the formal name of a person. It is used as an extension to the Person and PersonRow data types, and depending on circumstances is optionally used as a static method.
Because user SAL0 is associated with the country Norway, and Norway does not use a title as part of the formal name, Kentβs title of Dr and Mr. are both are ignored in output.
AddressFormat ExtraFlags property. When set, the title is added to the name. However, the people with ID 59 and 60 are Norwegian, and therefore the AddressFormat in that case specifies that that title should not appear with the name. To help clarify, the example below changes the personβs country of origin, and then performs the same logic.
Conclusion
UsingPersonNameFormatter is useful when working with Person and PersonRow, and makes it easy to get targeting information without having to roll your own name formatter.