コード例 #1
0
 public bool Add(CompareAbleObject objectToAdd)
 {
     if (_actIndex < _objects.Length)
     {
         _objects[_actIndex] = objectToAdd;
         _actIndex++;
         return(true);
     }
     return(false);
 }
コード例 #2
0
        public Object GetHighestElement()
        {
            CompareAbleObject highestElement = null;

            if (_actIndex > 0)
            {
                highestElement = _objects[0];
                for (int i = 0; i < Length; i++)
                {
                    if (highestElement.CompareObj(_objects[i]) < 0)
                    {
                        highestElement = _objects[i];
                    }
                }
            }
            return(highestElement);
        }