.net collection for fast insert/delete

后端 未结 6 1157
梦毁少年i
梦毁少年i 2021-01-30 11:43

I need to maintain a roster of connected clients that are very shortlived and frequently go up and down. Due to the potential number of clients I need a collection that supports

6条回答
  •  迷失自我
    2021-01-30 12:28

    You could use a Hashtable or strongly typed Dictionary. The client class might override GetHashCode to provide a faster hash code generation, or if using Hashtable you can optionally use an IHashCodeProvider.

提交回复
热议问题