Converts current complex number to string in Cartesian form by using the specified culture-specific formatting information.
using System;
using System.Globalization;
using System.Numerics;
public class Example
{
public static void Main()
{
Complex[] c = { new Complex(1.3, 1.1), new Complex(-11.1, -1.2) };
CultureInfo[] cultures = { new CultureInfo("en-US"),
new CultureInfo("fr-FR") };
foreach (Complex c1 in c)
{
foreach (CultureInfo culture in cultures)
Console.Write("{0} ({1}) ", c1.ToString(culture), culture.Name);
Console.WriteLine();
}
}
}
Related examples in the same category