Open njlr opened 1 year ago
@njlr Yes, currently NumberStyles
and cultures are not supported for bigint
.
A compiler warning needs to be added. I've renamed the issue to clarify it.
In the mean time, parsing without styles/cultures should work (if you need NumberStyles.Any
).
The supported formats (for JS) is what the BigInt constructor supports (i.e. something similar to invariant culture).
BigInteger.TryParse(s, &n)
BigInteger.Parse(s)
That's not going to work for hex style, so I'll leave this open until it gets resolved.
Description
BigInteger.TryParse
andBigInteger.Parse
accept different strings.Repro code
https://fable.io/repl/#?code=PYBwpgdgBAygngZwC5gLYChSVolqB0AcgK6pgBOAlgMYKbjTzJr4DiANsAEYCG7lALx5JKwCOnTswSKAigBeKACIAjACYAzABYArADYA7AA4AnAAZ12-UolSZqYkh5cpUaIrMBJCZQBmUACFKAHNPCBRginwAFXI4AAUecgQwAAoEABooElQuChgkOCkEfABBCDgsgGFidiRicjAw32B8MIA3JMoecJq6hrAsgDIIAEooJAALSHQoKBAqcN9oABIlAsXgqEo5HihO-gATKC4QynCALigAUlKAbwgAXxswdhTZ+cWkZag1jfOtjs3MAZHsDpRjqdguckDZ0Eg4lAPnY3ApAiEwhEoolkmlMtlSHlyAUimASuVKlA+vVGs1Wh0uj0kNSBqMPgsYT8-giAdtdvs+BCTmdLjd7k8bAB3ShTKAAfSgAFoAHzsr5c9Y8iCAuQQEFQMGCyEi2HoIA&html=DwCwLgtgNgfAUHUBTAhgE3gAm54ElgqbhgAOAtEgI4CuAlgG4C8A5AMID2AdmEj+QBUAnqSQtMAY268erXgA8wAenDQA3JJAoATgGcCTGmABm5ABwt4wFagwJgAIw5oh8REqcu311bDhA&css=Q
Expected and actual results
Expected:
Actual: