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 for custom software development.

Sunday, April 22, 2018

View GAC from Visual Studio

What assemblies are running in the Global Application Cache (GAC)?   

You can use the gacutil utility to view the GAC but it's really convenient to view GAC assemblies in Visual Studio.

Open the Assembly Explorer.
Click the "Open from GAC" button as shown in this image.

Visit for custom software development.