Name Parser
ParseName(String,NameOrder) Method
Example 



KellermanSoftware.NameParser Namespace > NameParserLogic Class > ParseName Method : ParseName(String,NameOrder) Method
Example: Mr. John A. Smith Jr.
Detect the first name and last name order
Parse a name into parts such as first name, last name, middle initial etc.
Syntax
'Declaration
 
Public Overloads Function ParseName( _
   ByVal name As String, _
   ByVal order As NameOrder _
) As NameParts
'Usage
 
Dim instance As NameParserLogic
Dim name As String
Dim order As NameOrder
Dim value As NameParts
 
value = instance.ParseName(name, order)
public NameParts ParseName( 
   string name,
   NameOrder order
)
public:
NameParts^ ParseName( 
   String^ name,
   NameOrder order
) 

Parameters

name
Example: Mr. John A. Smith Jr.
order
Detect the first name and last name order

Return Value

The parsed name
Example
NameParserLogic parser = new NameParserLogic(); //Trial Mode
//NameParserLogic parser = new NameParserLogic("place user name here", "place license key here");  //License Mode
            
NameParts parts = parser.ParseName("Mr. John Albert Jones Jr.", NameOrder.AutoDetect);
Console.WriteLine(parts.Honorific);
Console.WriteLine(parts.FirstName);
Console.WriteLine(parts.MiddleName);
Console.WriteLine(parts.LastName);
Console.WriteLine(parts.Suffix);
Console.WriteLine(parts.IsMale);
Dim parser As New NameParserLogic() 'Trial Mode
'Dim parser As New NameParserLogic("place user name here", "place license key here") 'License Mode
Dim parts As NameParts = parser.ParseName("Mr. John Albert Jones Jr.", NameOrder.AutoDetect)
Console.WriteLine(parts.Honorific)
Console.WriteLine(parts.FirstName)
Console.WriteLine(parts.MiddleName)
Console.WriteLine(parts.LastName)
Console.WriteLine(parts.Suffix)
Console.WriteLine(parts.IsMale)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

NameParserLogic Class
NameParserLogic Members
Overload List