Ejemplo n.º 1
0
        protected virtual void InsertSample(string sp)
        {
            LinkedListNode <string> node = Samples.First;

            do
            {
                if (node == null)
                {
                    node = Samples.AddFirst(sp);
                    break;
                }
                else if (node.Value.CompareTo(sp) > 0)
                {
                    node = Samples.AddBefore(node, sp);
                    break;
                }
                node = node.Next;
            } while (node != null);

            if (node == null)
            {
                node = Samples.AddLast(sp);
            }
        }