title: Complex numbers in c#
body: <p>I have an assignment to write a Complex number implementation :-</p>
  
  <pre><code>Complex c = new Complex(1.2,2.0)
  </code></pre>
  
  <p>Write properties real and Imaginary to get the real and imaginary part of a complex number. which are used like this:</p>
  
  <pre><code>double x = c.Real;
  </code></pre>
  
  <p>Write a method to add two complex numbers and return their sum. The real part is the sum of the two real parts, and the imaginary part the sum of the two imaginary parts.</p>
  
  <pre><code>Complex c = c1.Sum(c2);
  </code></pre>
  
  <p>Write a method to calculate the product of the two complex numbers. If one number has components <code>x1</code> and <code>y1</code> and the second number has components, <code>x2</code> and <code>y2</code>:</p>
  
  <p>the real part of the product = <code>x1 *x2 - y1 *y2</code>;
  the imaginary part = <code>x1 * y2 + x2 *y1</code>;</p>
  
  <p>So I know and am pretty confident-ish with complex numbers manually such as <code>4 +5i</code> where <code>5i</code> is imaginary, </p>
  
  <p>My questions is,  I'm not sure how to get the app to know which one is imaginary, unless I make on input a predefined imaginary number.. The minute I do that though the " app " loses it's worthiness cause then it's not an complex number just some random calc app. Basically I have no clue how to proceed.. Thanks</p>