AForge.Math.Complex.TryParse C# (CSharp) Method

TryParse() public static method

Try to convert the specified string to its Complex equivalent.
public static TryParse ( string s, Complex &result ) : bool
s string A string representation of a complex number.
result Complex instance to output the result to.
return bool
        public static bool TryParse(string s, out Complex result)
        {
            try
            {
                Complex newComplex = Parse(s);
                result = newComplex;
                return true;
            }
            catch (FormatException)
            {
                result = new Complex();
                return false;
            }
        }