How to mask first two letter and last four letters of credit card number. I am able to do the last four digits but the first two digits I can't.
I am using following code:
string result = s.Substring(s.Length - 4).PadLeft(4, '*');
Please let me know the best practice.