System.Collections.SortedList.Remove C# (CSharp) Method

Remove() public method

public Remove ( Object key ) : void
key Object
return void
        public virtual void Remove(Object key)
        {
            int i = IndexOfKey(key);
            if (i >= 0)
                RemoveAt(i);
        }

Same methods

SortedList::Remove ( object key ) : void

Usage Example

        //---------------------------------------------------------------------
        public bool Close(string SocketID_in)
        {
            SocketHandler Connection = default(SocketHandler);

            Connection = (SocketHandler)this.Sockets[SocketID_in];
            if ((Connection == null))
            {
                return(false);
            }
            try
            {
                if ((Connection.Socket != null))
                {
                    if (Connection.Socket.Connected)
                    {
                        //TraceText("T", "SocketManager::Close", "Closing [" & Connection.Socket.RemoteEndPoint.ToString() & "].")
                        Connection.Socket.Shutdown(System.Net.Sockets.SocketShutdown.Both);
                    }
                }
            }
            catch (Exception ex)
            {
                //TraceText("E", "SocketManager::Close", ex.ToString())
                Sockets.Remove(Connection.SocketID);
                return(false);
            }
            Sockets.Remove(Connection.SocketID);
            return(true);
        }
All Usage Examples Of System.Collections.SortedList::Remove