当前位置: 代码迷 >> .NET分析设计 >> 关于GetHashCode用法,该怎么处理
  详细解决方案

关于GetHashCode用法,该怎么处理

热度:2826   发布时间:2013-02-25 00:00:00.0
关于GetHashCode用法
需要做一个能转发在线用户列表的聊天服务器 以下各句代码的具体作用是什么呢?2001表示登陆成功。还望各位给我指点下,能否在重点代码上加个注释?? 
foreach (ClientService item in clietn)
                                {
                                    if (item.mysock.GetHashCode() == model.TcpClientHashCode)
                                    {
                                        item.SendMessage(loginState);                                        
                                        if (loginState == "2001")
                                        {
                                            foreach (OnlineModel onLineItem in onlineList)
                                            {
                                                if (onLineItem.TcpClientHashCode != model.TcpClientHashCode)
                                                {
                                                    string userId = onLineItem.UserId.ToString();
                                                    while (true)
                                                    {