public int CompareTo(object obj)
    {
        if (obj == null)
        {
            return(1);
        }
        MyOwnType other = obj as MyOwnType;

        if (other != null)
        {
            return(this.Id.CompareTo(other.Id));
        }
        else
        {
            throw new ArgumentException("Object is not a MyOwnType");
        }
    }
Exemple #2
0
 public myStruct(MyOwnType val1, int val2, int val3)
 {
     value1 = val1;
     value2 = val2;
     value3 = val3;
 }