Example #1
0
public static complex operator +(complex a, complex b) 
{ 
complex c = new complex(); 
c.b = a.b * b.b; 
c.a = a.a * b.b + b.a * a.b; 
return c; 
} 
Example #2
0
static void Main(string[] args) 
{ 
int x = Convert.ToInt32(Console.ReadLine()), y = Convert.ToInt32(Console.ReadLine()); 
complex a = new complex(x,y); 
complex b = new complex(22, 7); 
Console.WriteLine(a + b); 
Console.ReadKey(); 
}