Maha

Maha

  • NA
  • 0
  • 324.2k

NP93 Error in Program

Apr 6 2008 9:52 AM

Hi Guys

 

NP93 Error in Program

 

I got this program from a website. Website address is given below. This program is not executing. Anyone knows please correct the error.

 

Thank you

 

//http://msdn2.microsoft.com/en-us/library/system.iformatprovider.aspx

 

using System;

public class TestFormatting

{

   public static void Main()

   {

      long acctNumber;

 

      acctNumber = 104254567890;

      Console.WriteLine(String.Format(new AcctNumberFormat(), "{0:H}", acctNumber));

      Console.WriteLine(String.Format(new AcctNumberFormat(), "{0}", acctNumber));

 

      acctNumber = 14567890;

      Console.WriteLine(String.Format(new AcctNumberFormat(), "{0:H}", acctNumber));

      Console.WriteLine(String.Format(new AcctNumberFormat(), "{0}", acctNumber));

 

      acctNumber = 18779887654111;

      Console.WriteLine(String.Format(new AcctNumberFormat(), "{0:H}", acctNumber));

      Console.WriteLine(String.Format(new AcctNumberFormat(), "{0}", acctNumber));

   }

}

// The example displays the following output to the console:

//       10425-456-7890

//       104254567890

//       00001-456-7890

//       000014567890

//       18779-887-6541

//       187798876541


Answers (2)