<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp_by_API%2FSystem%2FIEquatable</id>
		<title>Csharp/C Sharp by API/System/IEquatable - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp_by_API%2FSystem%2FIEquatable"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System/IEquatable&amp;action=history"/>
		<updated>2026-04-30T04:03:31Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System/IEquatable&amp;diff=4783&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System/IEquatable&amp;diff=4783&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:35Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System/IEquatable&amp;diff=4784&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System/IEquatable&amp;diff=4784&amp;oldid=prev"/>
				<updated>2010-05-26T12:11:51Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==implements IEquatable==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
public struct Complex : IComparable, IEquatable&amp;lt;Complex&amp;gt;, IComparable&amp;lt;Complex&amp;gt;{&lt;br /&gt;
    public Complex( double real, double img ) {&lt;br /&gt;
        this.real = real;&lt;br /&gt;
        this.img = img;&lt;br /&gt;
    }&lt;br /&gt;
    public override bool Equals( object other ) {&lt;br /&gt;
        bool result = false;&lt;br /&gt;
        if( other is Complex ) {&lt;br /&gt;
            result = Equals( (Complex) other );&lt;br /&gt;
        }&lt;br /&gt;
        return result;&lt;br /&gt;
    }&lt;br /&gt;
    public bool Equals( Complex that ) {&lt;br /&gt;
        return (this.real == that.real &amp;amp;&amp;amp; this.img == that.img);&lt;br /&gt;
    }&lt;br /&gt;
    public override int GetHashCode() {&lt;br /&gt;
        return (int) this.Magnitude;&lt;br /&gt;
    }&lt;br /&gt;
    public int CompareTo( Complex that ) {&lt;br /&gt;
        int result;&lt;br /&gt;
        if( Equals( that ) ) {&lt;br /&gt;
            result = 0;&lt;br /&gt;
        } else if( this.Magnitude &amp;gt; that.Magnitude ) {&lt;br /&gt;
            result = 1;&lt;br /&gt;
        } else {&lt;br /&gt;
            result = -1;&lt;br /&gt;
        }&lt;br /&gt;
        return result;&lt;br /&gt;
    }&lt;br /&gt;
    int IComparable.rupareTo( object other ) {&lt;br /&gt;
        if( !(other is Complex) ) {&lt;br /&gt;
            throw new ArgumentException( &amp;quot;Bad Comparison&amp;quot; );&lt;br /&gt;
        }&lt;br /&gt;
        return CompareTo( (Complex) other );&lt;br /&gt;
    }&lt;br /&gt;
    public override string ToString() {&lt;br /&gt;
        return String.Format( &amp;quot;({0}, {1})&amp;quot;, real, img );&lt;br /&gt;
    }&lt;br /&gt;
    public double Magnitude {&lt;br /&gt;
        get {&lt;br /&gt;
            return Math.Sqrt( Math.Pow(this.real, 2) + Math.Pow(this.img, 2) );&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    public static bool operator==( Complex lhs, Complex rhs ) {&lt;br /&gt;
        return lhs.Equals( rhs );&lt;br /&gt;
    }&lt;br /&gt;
    public static bool operator!=( Complex lhs, Complex rhs ) {&lt;br /&gt;
        return !lhs.Equals( rhs );&lt;br /&gt;
    }&lt;br /&gt;
    public static bool operator&amp;lt;( Complex lhs, Complex rhs ) {&lt;br /&gt;
        return lhs.rupareTo( rhs ) &amp;lt; 0;&lt;br /&gt;
    }&lt;br /&gt;
    public static bool operator&amp;gt;( Complex lhs, Complex rhs ) {&lt;br /&gt;
        return lhs.rupareTo( rhs ) &amp;gt; 0;&lt;br /&gt;
    }&lt;br /&gt;
    public static bool operator&amp;lt;=( Complex lhs, Complex rhs ) {&lt;br /&gt;
        return lhs.rupareTo( rhs ) &amp;lt;= 0;&lt;br /&gt;
    }&lt;br /&gt;
    public static bool operator&amp;gt;=( Complex lhs, Complex rhs ) {&lt;br /&gt;
        return lhs.rupareTo( rhs ) &amp;gt;= 0;&lt;br /&gt;
    }&lt;br /&gt;
    private double real;&lt;br /&gt;
    private double img;&lt;br /&gt;
}&lt;br /&gt;
public class MainClass&lt;br /&gt;
{&lt;br /&gt;
    static void Main() {&lt;br /&gt;
        Complex cpx1 = new Complex( 1.0, 3.0 );&lt;br /&gt;
        Complex cpx2 = new Complex( 1.0, 2.0 );&lt;br /&gt;
        Console.WriteLine( &amp;quot;cpx1 = {0}, cpx1.Magnitude = {1}&amp;quot;, cpx1, cpx1.Magnitude );&lt;br /&gt;
        Console.WriteLine( &amp;quot;cpx2 = {0}, cpx2.Magnitude = {1}\n&amp;quot;, cpx2, cpx2.Magnitude );&lt;br /&gt;
        Console.WriteLine( &amp;quot;cpx1 == cpx2 ? {0}&amp;quot;, cpx1 == cpx2 );&lt;br /&gt;
        Console.WriteLine( &amp;quot;cpx1 != cpx2 ? {0}&amp;quot;, cpx1 != cpx2 );&lt;br /&gt;
        Console.WriteLine( &amp;quot;cpx1 &amp;lt;  cpx2 ? {0}&amp;quot;, cpx1 &amp;lt; cpx2 );&lt;br /&gt;
        Console.WriteLine( &amp;quot;cpx1 &amp;gt;  cpx2 ? {0}&amp;quot;, cpx1 &amp;gt; cpx2 );&lt;br /&gt;
        Console.WriteLine( &amp;quot;cpx1 &amp;lt;= cpx2 ? {0}&amp;quot;, cpx1 &amp;lt;= cpx2 );&lt;br /&gt;
        Console.WriteLine( &amp;quot;cpx1 &amp;gt;= cpx2 ? {0}&amp;quot;, cpx1 &amp;gt;= cpx2 );&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>