public static string MaskSSN(string ssn) { string pattern = @"(?:\d{3})-(?:\d{2})-(\d{4})"; return (null != ssn) ? Regex.Replace(ssn, pattern, "XXX-XX-$1") : string.Empty; }
Friday, October 5, 2012
Masking SSN in C#
Labels:
Masking SSN
Subscribe to:
Post Comments (Atom)
I have read your blog its very attractive and impressive. I like it your blog.
ReplyDeleteASP.NET MVC Training in Chennai
ASP.NET MVC Online Training | Online LINQ Training | ASP.NET Online Training
Thanks for sharing useful information. I am giving best MVC online training
ReplyDeleteMVC online training
online MVC training
asp.net with MVC training
MVC training