Is there any way I can get ONLY the first name of a user in WindowsIdentity? Now I'm getting full name by this code:
DirectoryEntry userEntry = new DirectoryEntry("WinNT://" + domain + "/" + userName + ",User");
string fullName = (string)userEntry.Properties["fullname"].Value;
But I want to seperate between first name and last name.
(right now I'm using split(' ')
but there are users with two or more first and last name and I have no way to handel this.)
Thanks.