According to dailydotnettips website. Complex numbers are not new to numeral system. A complex number contains one real part and another imaginary part. We can easily implement such a Type, but with .NET 4.0 System.Numerics.dll contains a new Type (struct) called Complex which deals with Complex numbers .

You can represent a number in Complex form very easily using Complex type.
Lets see how :
   
Complex c = new Complex(4.4, 3.1);
Console.WriteLine(c);


You can even specify like this :
   
Complex c = 35.302;
Console.WriteLine(c);


Or like this :
   
Complex c = (Complex)35.302m;
Console.WriteLine(c);


So everything is taken care automatically. You can also use FromPolarCoordinates to take a complex number from its polar co-ordinates.
   
Complex c = Complex.FromPolarCoordinates(39.454834, 2.548454);
Console.WriteLine(c);


You can get each component of a Complex number using properties associated with it.

Real : Represents the Real part of the Number.
Imaginary : Represents the Imaginary part of the number.
Magintude : Gets the absolute value of the Complex number
Phase : Gets the phase of the complex number.

The complex number also exposes some of the important methods :

Conjugate
Log
Reciprocal
Sqrt (Square Root) etc.


For more information about Complex numbers please refer ComplexNumber
Hope you like this post.
Happy Coding.

Best ASP.NET Hosting Recommendation

ASPHostPortal.com provides our customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server 2012. We offers Windows hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable Windows server 2012 Hosting, we should be your best choice.