System.Numerics 4.0.0.0 System.ValueType System.IEquatable<System.Numerics.Complex> System.IFormattable

A complex number is a number that comprises a real number part and an imaginary number part. A complex number z is usually written in the form z = x + yi, where x and y are real numbers, and i is the imaginary unit that has the property i2 = -1. The real part of the complex number is represented by x, and the imaginary part of the complex number is represented by y.

The type uses the Cartesian coordinate system (real, imaginary) when instantiating and manipulating complex numbers. A complex number can be represented as a point in a two-dimensional coordinate system, which is known as the complex plane. The real part of the complex number is positioned on the x-axis (the horizontal axis), and the imaginary part is positioned on the y-axis (the vertical axis).

Any point in the complex plane can also be expressed based on its absolute value, by using the polar coordinate system., In polar coordinates, a point is characterized by two numbers:

Its magnitude, which is the distance of the point from the origin (that is, 0,0, or the point at which the x-axis and the y-axis intersect).

Its phase, which is the angle between the real axis and the line drawn from the origin to the point.

## Instantiating a Complex Number

You can assign a value to a complex number in one of the following ways:

By passing two values to its constructor. The first value represents the real part of the complex number, and the second value represents its imaginary part. These values represent the position of the complex number in the two-dimensional Cartesian coordinate system.

By calling the static (Shared in Visual Basic) method to create a complex number from its polar coordinates.

By assigning a , , , , , , , , , or value to a object. The value becomes the real part of the complex number, and its imaginary part equals 0.

By casting (in C#) or converting (in Visual Basic) a or value to a object. The value becomes the real part of the complex number, and its imaginary part equals 0.

By assigning the complex number that is returned by a method or operator to a object. For example, is a static method that returns a complex number that is the sum of two complex numbers, and the operator adds two complex numbers and returns the result.

The following example demonstrates each of these five ways of assigning a value to a complex number.

code reference: System.Numerics.Complex.Class#2

## Operations with Complex Numbers

The structure in the .NET Framework includes members that provide the following functionality:

Methods to compare two complex numbers to determine whether they are equal.

Operators to perform arithmetic operations on complex numbers. operators enable you to perform addition, subtraction, multiplication, division, and unary negation with complex numbers.

Methods to perform other numerical operations on complex numbers. In addition to the four basic arithmetic operations, you can raise a complex number to a specified power, find the square root of a complex number, and get the absolute value of a complex number.

Methods to perform trigonometric operations on complex numbers. For example, you can calculate the tangent of an angle represented by a complex number.

## Precision and Complex Numbers

The real and imaginary parts of a complex number are represented by two double-precision floating-point values. This means that values, like double-precision floating-point values, can lose precision as a result of numerical operations. This means that strict comparisons for equality of two values may fail, even if the difference between the two values is due to a loss of precision. For more information, see .

For example, performing exponentiation on the logarithm of a number should return the original number. However, in some cases, the loss of precision of floating-point values can cause slight differences between the two values, as the following example illustrates.

code reference: System.Numerics.Complex.Class#5

Similarly, the following example, which calculates the square root of a number, produces slightly different results on the 32-bit and IA64 versions of the .NET Framework.

code reference: System.Numerics.Complex.Class#6

## Complex Numbers, Infinity, and NaN

The real and imaginary parts of a complex number are represented by values. In addition to ranging from to , the real or imaginary part of a complex number can have a value of , , or . , , and all propagate in any arithmetic or trigonometric operation.

In the following example, division by produces a complex number whose real and imaginary parts are both . As a result, performing multiplication with this value also produces a complex number whose real and imaginary parts are . Similarly, performing a multiplication that overflows the range of the type produces a complex number whose real part is and whose imaginary part is . Subsequently performing division with this complex number returns a complex number whose real part is and whose imaginary part is .

code reference: System.Numerics.Complex.Class#3

Mathematical operations with complex numbers that are invalid or that overflow the range of the data type do not throw an exception. Instead, they return a , , or under the following conditions:

The division of a positive number by zero returns .

Any operation that overflows the upper bound of the data type returns .

The division of a negative number by zero returns .

Any operation that overflows the lower bound of the data type returns .

The division of a zero by zero returns .

Any operation that is performed on operands whose values are , , or returns , , or , depending on the specific operation.

Note that this applies to any intermediate calculations performed by a method. For example, the multiplication of new Complex(9e308, 9e308) and new Complex(2.5, 3.5) uses the formula (ac - bd) + (ad + bc)i. The calculation of the real component that results from the multiplication evaluates the expression 9e308 * 2.5 - 9e308 * 3.5. Each intermediate multiplication in this expression returns , and the attempt to subtract from returns .

## Formatting a Complex Number

By default, the string representation of a complex number takes the form (real, imaginary), where real and imaginary are the string representations of the values that form the complex number's real and imaginary components. Some overloads of the method allow customization of the string representations of these values to reflect the formatting conventions of a particular culture or to appear in a particular format defined by a standard or custom numeric format string. (For more information, see Standard Numeric Format Strings and Custom Numeric Format Strings.)

One of the more common ways of expressing the string representation of a complex number takes the form a + bi, where a is the complex number's real component, and b is the complex number's imaginary component. In electrical engineering, a complex number is most commonly expressed as a + bj. You can return the string representation of a complex number in either of these two forms. To do this, define a custom format provider by implementing the and interfaces, and then call the method.

The following example defines a ComplexFormatter class that represents a complex number as a string in the form of either a + bi or a + bj.

code reference: System.Numerics.Complex.Class#1

The following example then uses this custom formatter to display the string representation of a complex number.

code reference: System.Numerics.Complex.Class#4

Represents a complex number.

- Constructor
  4.0.0.0

  The or arguments may lose precision if they are data types that require an explicit cast to .

  Initializes a new instance of the structure using the specified real and imaginary values.

  The real part of the complex number.
  The imaginary part of the complex number.
- Method
  4.0.0.0
  System.Double ``

  The absolute value of a complex number is equivalent to its property. The absolute value of a real number a + bi is calculated as follows:

  If b = 0, the result is 0.

  If a > b, the result is a * (1 + b2/a2).

  If b > a, the result is b * (1 + a2/b2).

  If the calculation of the absolute value results in an overflow, the method returns either or . If either the or property is and the other property is neither nor , the method returns .

  Gets the absolute value (or magnitude) of a complex number.

  The absolute value of .

  A complex number.
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The method for complex numbers corresponds to the method for real numbers.

  The method uses the following formula:

  (- ) * ( + * ( - * )))

  Returns the angle that is the arc cosine of the specified complex number.

  The angle, measured in radians, which is the arc cosine of .

  A complex number that represents a cosine.
- Method
  4.0.0.0
  System.Numerics.Complex `` ``

  The addition of a complex number, a + bi, and a second complex number, c + di, takes the following form:

  (a + c) + (b + d)i.

  If the method call results in an overflow in either the real or imaginary component, the value of the component is either or .

  Languages that do not support custom operators can use the method to perform addition with complex numbers.

  Adds two complex numbers and returns the result.

  The sum of and .

  The first complex number to add. The second complex number to add.
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The method for complex numbers corresponds to the method for real numbers.

  The method uses the following formula:

  - * ( * value + ( - value * value))

  Returns the angle that is the arc sine of the specified complex number.

  The angle which is the arc sine of .

  A complex number.
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The method for complex numbers corresponds to the method for real numbers.

  The method uses the following formula:

  / new Complex(2.0, 0.0)) * ( ( - * value) - ( + ImaginaryOne * value)

  Returns the angle that is the arc tangent of the specified complex number.

  The angle that is the arc tangent of .

  A complex number.
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The conjugate of a complex number inverts the sign of the imaginary component; that is, it applies unary negation to the imaginary component. If a + bi is a complex number, its conjugate is a - bi.

  Computes the conjugate of a complex number and returns the result.

  The conjugate of .

  A complex number.
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The method for complex numbers corresponds to the method for real numbers.

  The method uses the following formula to calculate the cosine of the complex number a + bi:

  ( (a) * (b), -( (a) * (b)))

  Returns the cosine of the specified complex number.

  The cosine of .

  A complex number.
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The method for complex numbers corresponds to the method for real numbers.

  The method uses the following formula to calculate the hyperbolic cosine of the complex number a + bi:

  ((a) * (b), (a) * (b))

  Returns the hyperbolic cosine of the specified complex number.

  The hyperbolic cosine of .

  A complex number.
- Method
  4.0.0.0
  System.Numerics.Complex `` ``

  The division of a complex number, a + bi, by a second complex number, number, c + di, takes the following form:

  ((ac + bd) / (c 2 + d 2 )) + ((bc - ad) / (c 2 + d 2 )i

  If the calculation of the quotient results in an overflow in either the real or imaginary component, the value of that component is either or .

  The method can be used by languages that do not support custom operators. Its behavior is identical to division using the division operator.

  Divides one complex number by another and returns the result.

  The quotient of the division.

  The complex number to be divided. The complex number to divide by.
- Method
  4.0.0.0
  System.Boolean ``

  The method provides the implementation for the structure. It performs slightly better than method because it does not have to convert its parameter to a complex number.

  Two complex numbers are equal if their real parts are equal and their imaginary parts are equal. The method is equivalent to the following expression:

  code reference: System.Numerics.Complex.Equals#1

  Returns a value that indicates whether the current instance and a specified complex number have the same value.

  true if this complex number and have the same value; otherwise, false.

  The complex number to compare.
- Method
  4.0.0.0
  System.Boolean ``

  Two complex numbers are equal if their real parts are equal and their imaginary parts are equal. The method is equivalent to the following expression:

  code reference: System.Numerics.Complex.Equals#2

  If the parameter is not a object, but it is a data type for which an implicit conversion is defined, the method converts to a object whose real part is equal to the value of and whose imaginary part is equal to zero before it performs the comparison. The following example illustrates this by finding that a complex number and a double-precision floating-point value are equal.

  code reference: System.Numerics.Complex.Equals#6

  Returns a value that indicates whether the current instance and a specified object have the same value.

  true if the parameter is a object or a type capable of implicit conversion to a object, and its value is equal to the current object; otherwise, false.

  The object to compare.
- Method
  4.0.0.0
  System.Numerics.Complex ``

  Use the method to calculate the powers of other bases.

  The method for complex numbers corresponds to the method for real numbers. is the inverse of .

  Returns e raised to the power specified by a complex number.

  The number e raised to the power .

  A complex number that specifies a power.
- Method
  4.0.0.0
  System.Numerics.Complex `` ``

  The method instantiates a complex number based on its polar coordinates.

  Because there are multiple representations of a point on a complex plane, the return value of the method is normalized. The magnitude is normalized to a positive number, and the phase is normalized to a value in the range of - to . As a result, the values of the and properties of the resulting complex number may not equal the original values of the and parameters.

  To convert a value from degrees to radians for the parameter, multiply it by /180.

  Creates a complex number from a point's polar coordinates.

  A complex number.

  The magnitude, which is the distance from the origin (the intersection of the x-axis and the y-axis) to the number. The phase, which is the angle from the line to the horizontal axis, measured in radians.
- Method
  4.0.0.0
  System.Int32 To be added.

  Returns the hash code for the current object.

  A 32-bit signed integer hash code.

- Property
  4.0.0.0
  System.Double To be added.

  Given a complex number a + bi, the property returns the value of b.

  Gets the imaginary component of the current object.

- Field
  4.0.0.0
  System.Numerics.Complex To be added.

  Returns a new instance with a real number equal to zero and an imaginary number equal to one.

- Method
  4.0.0.0
  System.Numerics.Complex ``

  The method for complex numbers corresponds to the method for real numbers.

  Returns the natural (base e) logarithm of a specified complex number.

  The natural (base e) logarithm of .

  A complex number.
- Method
  4.0.0.0
  System.Numerics.Complex `` ``

  The method for complex numbers corresponds to the method for real numbers.

  Returns the logarithm of a specified complex number in a specified base.

  The logarithm of in base .

  A complex number. The base of the logarithm.
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The method for complex numbers corresponds to the method for real numbers.

  Returns the base-10 logarithm of a specified complex number.

  The base-10 logarithm of .

  A complex number.
- Property
  4.0.0.0
  System.Double To be added.

  The property is equivalent to the absolute value of a complex number. It specifies the distance from the origin (the intersection of the x-axis and the y-axis in the Cartesian coordinate system) to the two-dimensional point represented by a complex number. The absolute value is calculated as follows:

  | a + bi | = (a2 + b2)

  If the calculation of the absolute value results in an overflow, this property returns either or .

  The and the properties define the position of a point that represents a complex number in the polar coordinate system.

  You can instantiate a complex number based on its polar coordinates instead of its Cartesian coordinates by calling the method.

  Gets the magnitude (or absolute value) of a complex number.

- Method
  4.0.0.0
  System.Numerics.Complex `` ``

  The multiplication of a complex number, a + bi, and a second complex number, c + di, takes the following form:

  (ac - bd) + (ad + bc)i

  If the multiplication results in an overflow in either the real or imaginary component, the value of that component is either or .

  The method is implemented for languages that do not support custom operators. Its behavior is identical to multiplication using the multiplication operator.

  Returns the product of two complex numbers.

  The product of the and parameters.

  The first complex number to multiply. The second complex number to multiply.
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The additive inverse of a complex number is a complex number that produces a value of when it is added to the original complex number. This method returns a complex number in which the real and imaginary components of the original complex number are multiplied by -1.

  The method is implemented for languages that do not support custom operators. Its behavior is identical to negation using the unary negation operator, .

  Returns the additive inverse of a specified complex number.

  The result of the and components of the parameter multiplied by -1.

  A complex number.
- Field
  4.0.0.0
  System.Numerics.Complex To be added.

  Returns a new instance with a real number equal to one and an imaginary number equal to zero.

- Method
  4.0.0.0
  System.Numerics.Complex `` ``

  The method defines the addition operation for complex numbers. It enables code such as the following:

  code reference: System.Numerics.Complex.Add#3

  The addition of a complex number, a + bi, and a second complex number, c + di, takes the following form:

  (a + c) + (b + d)i

  If the method call results in an overflow in either the real or imaginary component, the value of that component is either or .

  Languages that do not support custom operators can call the method instead.

  Adds two complex numbers.

  The sum of and .

  The first value to add. The second value to add.
- Method
  4.0.0.0
  System.Numerics.Complex `` ``

  The method defines the division operation for complex numbers. It enables code such as the following:

  code reference: System.Numerics.Complex.Divide#2

  The division of a complex number, a + bi, and a second complex number, c + di, takes the following form:

  ((ac + bd) / (c 2 + d 2 )) + ((bc - ad) / (c 2 + d 2 )i

  If the division results in an overflow in either the real or imaginary component, the value of that component is either or .

  Languages that do not support custom operators and operator overloading can call the method instead.

  Divides a specified complex number by another specified complex number.

  The result of dividing by .

  The value to be divided. The value to divide by.
- Method
  4.0.0.0
  System.Boolean `` ``

  The method defines the operation of the equality operator for values. It enables code such as the following:

  code reference: System.Numerics.Complex.Equals#9

  Languages that do not support custom operators can call the method instead.

  Two complex numbers are equal if their real parts are equal and their imaginary parts are equal. The method is equivalent to the following expression:

  code reference: System.Numerics.Complex.Equals#3

  Note that, because of differences in precision, two complex numbers that are apparently equivalent can be considered unequal. For more information and a possible workaround, see the method.

  Returns a value that indicates whether two complex numbers are equal.

  true if the and parameters have the same value; otherwise, false.

  The first complex number to compare. The second complex number to compare.
- Method
  4.0.0.0
  System.Numerics.Complex `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Numerics.Complex `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Numerics.Complex `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Numerics.Complex `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Numerics.Complex `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Numerics.Complex `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Numerics.Complex `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Numerics.Complex `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Numerics.Complex `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Numerics.Complex `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Numerics.Complex `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.CLSCompliant(false)
  System.Numerics.Complex `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Boolean `` ``

  The method defines the operation of the inequality operator for complex numbers. It enables code such as the following:

  code reference: System.Numerics.Complex.Inequality#1

  Languages that do not support custom operators can test for inequality by calling the method and reversing its value.

  Note that, because of differences in precision, two complex numbers that are apparently equivalent can be considered unequal. One possible workaround is to implement a comparison method that returns true only if the difference between the two real and imaginary parts of the complex numbers exceeds a certain threshold (such as .01% of the value of the real or imaginary component of one of the complex numbers). For more information, see the method.

  Returns a value that indicates whether two complex numbers are not equal.

  true if and are not equal; otherwise, false.

  The first value to compare. The second value to compare.
- Method
  4.0.0.0
  System.Numerics.Complex `` ``

  The method defines the operation of the multiplication operator for complex numbers. It enables code such as the following:

  code reference: System.Numerics.Complex.Multiply#2

  The multiplication of a complex number, a + bi, and a second complex number, c + di, takes the following form:

  (ac - bd) + (ad + bc)i

  If the multiplication results in an overflow in either the real or imaginary component, the value of that component is either or .

  Languages that do not support custom operators can call the method instead.

  Multiplies two specified complex numbers.

  The product of and .

  The first value to multiply. The second value to multiply.
- Method
  4.0.0.0
  System.Numerics.Complex `` ``

  The method defines the operation of the subtraction operator for complex numbers. It enables code such as the following:

  code reference: System.Numerics.Complex.Subtract#2

  If the method call results in an overflow in either the real or imaginary component, the value of that component is either or .

  The subtraction of a complex number, c + di, from another complex number, a + bi, takes the following form:

  (a - c) + (b - d)i

  Languages that do not support custom operators can call the method instead.

  Subtracts a complex number from another complex number.

  The result of subtracting from .

  The value to subtract from (the minuend). The value to subtract (the subtrahend).
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The method defines the operation of the unary negation (additive inverse) operator for complex numbers. It enables code such as the following:

  code reference: System.Numerics.Complex.Negate#2

  The resulting complex number produces a value of 0 (zero) when it is added to the original complex number. Languages that do not support custom operators can call the method instead.

  Returns the additive inverse of a specified complex number.

  The result of the and components of the parameter multiplied by -1.

  The value to negate.
- Property
  4.0.0.0
  System.Double To be added.

  For a complex number a + bi, the phase is computed as (b, a).

  You can identify a complex number by its Cartesian coordinates on the complex plane or by its polar coordinates. The phase (argument) of a complex number is the angle to the real axis of a line drawn from the point of origin (the intersection of the x-axis and the y-axis) to the point represented by the complex number. The magnitude (represented by the property) is the distance from the point of origin to the point that is represented by the complex number.

  You can instantiate a complex number based on its polar coordinates instead of its Cartesian coordinates by calling the method.

  To convert the phase from radians to degrees, multiply it by 180/.

  Gets the phase of a complex number.

- Method
  4.0.0.0
  System.Numerics.Complex `` ``

  If is , the method returns . For other values, if is 0, the method returns , and if is 1, it returns .

  This method corresponds to the method for primitive numeric types.

  Returns a specified complex number raised to a power specified by a double-precision floating-point number.

  The complex number raised to the power .

  A complex number to be raised to a power. A double-precision floating-point number that specifies a power.
- Method
  4.0.0.0
  System.Numerics.Complex `` `` To be added.

  Returns a specified complex number raised to a power specified by a complex number.

  The complex number raised to the power .

  A complex number to be raised to a power. A complex number that specifies a power.
- Property
  4.0.0.0
  System.Double To be added.

  Given a complex number a + bi, the property returns the value of a.

  Gets the real component of the current object.

- Method
  4.0.0.0
  System.Numerics.Complex ``

  The reciprocal, or multiplicative inverse, of a number x is a number y where x multiplied by y yields 1. The reciprocal of a complex number is the complex number that produces when the two numbers are multiplied. If a complex number is represented by a +bi, its reciprocal is represented by the expression a/(a2+b2) + -b/(a2 + b2).

  If value is , the method returns . Otherwise, it returns the result of the expression /.

  Returns the multiplicative inverse of a complex number.

  The reciprocal of .

  A complex number.
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The method for complex numbers corresponds to the method for real numbers.

  The method uses the following formula to calculate the sine of the complex number a + bi:

  ( (a) * (b), (a) * (b))

  Returns the sine of the specified complex number.

  The sine of .

  A complex number.
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The method for complex numbers corresponds to the method for real numbers.

  The method uses the following formula to calculate the hyperbolic sine of the complex number a + bi:

  ( (a) * (b), (a) * (b))

  Returns the hyperbolic sine of the specified complex number.

  The hyperbolic sine of .

  A complex number.
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The square root of the complex number is calculated by using the following formula:

  ( ( . ), . /2.0)

  The method for complex numbers corresponds to the method for real numbers.

  Returns the square root of a specified complex number.

  The square root of .

  A complex number.
- Method
  4.0.0.0
  System.Numerics.Complex `` ``

  The subtraction of a complex number, c + di, from another complex number, a + bi, takes the following form:

  (a - c) + (b - d)i

  If the method call results in an overflow in either the real or imaginary component, the value of that component is either or .

  Languages that do not support custom operators can use the method to perform subtraction using complex numbers.

  Subtracts one complex number from another and returns the result.

  The result of subtracting from .

  The value to subtract from (the minuend). The value to subtract (the subtrahend).
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The method for complex numbers corresponds to the method for real numbers.

  The method uses the following formula to calculate the tangent of the complex number :

  ( ) / ( )

  Returns the tangent of the specified complex number.

  The tangent of .

  A complex number.
- Method
  4.0.0.0
  System.Numerics.Complex ``

  The method for complex numbers corresponds to the method for real numbers.

  The method uses the following formula to calculate the hyperbolic tangent of the complex number :

  ( ) / ( )

  Returns the hyperbolic tangent of the specified complex number.

  The hyperbolic tangent of .

  A complex number.
- Method
  4.0.0.0
  System.String

  The default string representation of a complex number displays the number using its Cartesian coordinates in the form (a, b), where a is the real part of the complex number, and b is its imaginary part. Both a and b are formatted using the general format specifier ("G") and the conventions of the current system culture.

  Converts the value of the current complex number to its equivalent string representation in Cartesian form.

  The string representation of the current instance in Cartesian form.

- Method
  4.0.0.0
  System.String ``

  The string representation of the complex number returned by this method displays the number using its Cartesian coordinates in the form (a, b), where a is the real part of the complex number, and b is its imaginary part. Both a and b are formatted using the general format specifier ("G") and the conventions of the culture defined by .

  The parameter is an implementation. Its method returns a object that provides culture-specific information about the format of the real and imaginary numbers in the returned string. If is null, the returned string is formatted using the object of the current culture.

  The parameter can be one of the following:

  A object that represents the culture that supplies formatting information

  The object that supplies formatting information.

  A custom object that implements the interface. Its method returns the object that supplies formatting information.

  Converts the value of the current complex number to its equivalent string representation in Cartesian form by using the specified culture-specific formatting information.

  The string representation of the current instance in Cartesian form, as specified by .

  An object that supplies culture-specific formatting information.
- Method
  4.0.0.0
  System.String ``

  The string representation of the complex number returned by this method displays the number using its Cartesian coordinates in the form (a, b), where a is the real part of the complex number, and b is its imaginary part. Both a and b are formatted using the format string specified by . The parameter can be any valid standard numeric format specifier, or any combination of custom numeric format specifiers. If is equal to or is null, the real and imaginary parts of the complex number are formatted with the general format specifier ("G"). If is any other value, the method throws a .

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following topics:

  For more information about numeric format strings, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about formatting in the .NET Framework, see Formatting Types.

  The format of the returned string is determined by the object for the current culture. Depending on the parameter, this object controls symbols such as the negative sign, the group separator, and the decimal point symbol in the output string. To provide formatting information for cultures other than the current culture, call the overload.

  Converts the value of the current complex number to its equivalent string representation in Cartesian form by using the specified format for its real and imaginary parts.

  The string representation of the current instance in Cartesian form.

  A standard or custom numeric format string.
- Method
  4.0.0.0
  System.String `` ``

  The string representation of the complex number returned by this method displays the number using its Cartesian coordinates in the form (a, b), where a is the real part of the complex number, and b is its imaginary part. Both a and b are formatted using the format string specified by . The parameter can be any valid standard numeric format specifier, or any combination of custom numeric format specifiers. If is equal to or is null, the real and imaginary parts of the complex number are formatted with the general format specifier ("G"). If is any other value, the method throws a .

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following topics:

  For more information about numeric format strings, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about formatting in the .NET Framework, see Formatting Types.

  The parameter is an implementation. Its method returns a object that provides culture-specific information about the format of the real and imaginary numbers in the returned string. Depending on the parameter, this object controls symbols such as the negative sign, the group separator, and the decimal point symbol in the output string. If is null, the returned string is formatted using the object of the current culture.

  The parameter can be one of the following:

  A object that represents the culture that supplies formatting information

  The object that supplies formatting information.

  A custom object that implements the interface. Its method returns the object that supplies formatting information.

  Converts the value of the current complex number to its equivalent string representation in Cartesian form by using the specified format and culture-specific format information for its real and imaginary parts.

  The string representation of the current instance in Cartesian form, as specified by and .

  A standard or custom numeric format string. An object that supplies culture-specific formatting information.
- Field
  4.0.0.0
  System.Numerics.Complex

  The property is most frequently used to compare a value to zero.

  Returns a new instance with a real number equal to zero and an imaginary number equal to zero.