Wednesday, June 12, 2013

Format Phone Number

This is how you could format a phone number using a period as a separator:

String.Format("{0:###\\.###\\.####}", 1234567890);

The resulting string will look as follows: 123.456.7890.