예제 #1
0
        public int CompareTo(object obj)
        {
            BarFactoryItem that = obj as BarFactoryItem;

            if (that != null)
            {
                if (this.BarSize > that.BarSize)
                {
                    return(1);
                }
                if (this.BarSize < that.BarSize)
                {
                    return(-1);
                }
            }
            return(0);
        }
예제 #2
0
 public int Add(BarFactoryItem item)
 {
     this.items.Add(item);
     this.items.Sort();
     return this.items.IndexOf(item);
 }
예제 #3
0
 public int Add(BarFactoryItem item)
 {
     this.items.Add(item);
     this.items.Sort();
     return(this.items.IndexOf(item));
 }