Convert card numbers to XXXX-XXXX-XXXX-0000 Format I have a 16 character string that comes through something like this: 1234567891234567 I need to be able to format the string as it would appear in a system i e XXXX-XXXX-XXXX-4567 NOTE that the 4
c# - Format a Social Security Number (SSN) as XXX-XX-XXXX from . . . 25 I am getting a social security number (SSN) from a data warehouse While posting it to a CRM I want it to be formatted like XXX-XX-XXXX instead of XXXXXXXXX It's like converting a simple string with dashes at positions 4 and 7 I am pretty new to C#, so what is the best way to do this?