Mega Code Archive

 
Categories / C# / Data Types
 

NumberFormatInfo and BigIntegerParse

using System; using System.Numerics; using System.Globalization; public class Class1 {    public static void Main()    {         NumberFormatInfo fmt = new NumberFormatInfo();         fmt.NegativeSign = "~";                  BigInteger number = BigInteger.Parse("~9999999999999", fmt);         Console.WriteLine(number.ToString(fmt));         Console.WriteLine(number);    } }