Converts string in a specified culture-specific format to BigInteger
using System; using System.Globalization; using System.Text; using System.Numerics; public class Class1 { public static void Main() { BigInteger number = BigInteger.Parse("~6", new BigIntegerFormatProvider()); Console.WriteLine(number.ToString(new BigIntegerFormatProvider())); Console.WriteLine(number); } } public class BigIntegerFormatProvider : IFormatProvider { public object GetFormat(Type formatType) { if (formatType == typeof(NumberFormatInfo)) { NumberFormatInfo numberFormat = new NumberFormatInfo(); numberFormat.NegativeSign = "~"; return numberFormat; } else { return null; } } }