Custom Software Development

This blog covers software development issues.

Thursday, May 3, 2018

Format Phone Number

You have nine digits but you want to format the phone number for a readable display. 


string strContactPhone = "123456789";
Int64 phoneInt;

if (Int64.TryParse(strContactPhone, out phoneInt)) ;
{
    strContactPhone = String.Format("{0:(###) ###-####}", phoneInt);
}


Visit www.BlueCanyonSoftware.com for custom software development.
Posted by Unknown at 2:00 PM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Comments (Atom)

About Me

My photo
Danny Lents
View my complete profile

Blog Archive

  • ►  2019 (1)
    • ►  December (1)
  • ▼  2018 (3)
    • ►  July (1)
    • ▼  May (1)
      • Format Phone Number You have nine digits but you...
    • ►  April (1)
  • ►  2017 (6)
    • ►  August (1)
    • ►  April (2)
    • ►  January (3)
  • ►  2016 (4)
    • ►  September (1)
    • ►  May (1)
    • ►  March (1)
    • ►  February (1)
  • ►  2015 (12)
    • ►  December (2)
    • ►  October (1)
    • ►  September (1)
    • ►  August (3)
    • ►  May (1)
    • ►  April (1)
    • ►  March (2)
    • ►  January (1)
  • ►  2014 (11)
    • ►  December (1)
    • ►  October (2)
    • ►  July (2)
    • ►  May (1)
    • ►  April (1)
    • ►  February (4)
Picture Window theme. Powered by Blogger.