In the method
public static System.Numerics.Complex Parse(string s, IFormatProvider? provider);
what is requirements for the parameter ‘s’?
I have tried
string s = "<47; 0>";
Complex value = Complex.Parse(s, null);
I am just getting an OverflowException.
I am expecting an instance of type Complex or a FormatException
It looks like the following line in Complex.cs
if (!double.TryParse(s.Slice(openBracket + 1, semicolon), style, provider, out double real))
includes the ‘;’ in the first parameter in ‘double.TryParse’.
How can I prevent this?
New contributor
RdB is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.