Compute the conjugate of a complex number and returns the result in CSharp

Description

The following code shows how to compute the conjugate of a complex number and returns the result.

Example


using System;//w  w w . j  a  v  a2  s.com
using System.Numerics;

public class Example
{
   public static void Main()
   {
      Complex[] values = { new Complex(12.4, 6.3), 
                           new Complex(12.4, -6.3) };
      foreach (Complex value in values)
      {
         Console.WriteLine("Original value: {0}", value);
         Console.WriteLine("Conjugate:      {0}\n", 
                           Complex.Conjugate(value).ToString());
      }                           
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    Data Types »




C# Data Types
Bool
Byte
Char
Decimal
Double
Float
Integer
Long
Short
String
C# Array
Array Example
Byte Array
C# Standard Data Type Format
BigInteger
Complex
Currency
DateTime
DateTimeOffset
DateTime Format Parse Convert
TimeSpan
TimeZone
Enum
Null
tuple
var