How do I get right(string) in C#?
if user=”MyDomain\jKing”
I want just jking from the above string.
int index;
string user;
index = User.Identity.Name.IndexOf("\\");
user = (index > 0 ? User.Identity.Name.Substring(0, index) : "");
1 Answer