public void RoomInit(byte[] m_recvBuf) { roomUserNum = BitConverter.ToInt32(m_recvBuf, 8); int totalNameLeng = 0; for (int i = 0; i < roomUserNum; i++) { int tempNameLeng = BitConverter.ToInt32(m_recvBuf, 12 + totalNameLeng); members[i].text = Encoding.UTF8.GetString(m_recvBuf, 16 + totalNameLeng, tempNameLeng); totalNameLeng += (sizeof(int) + tempNameLeng); } members[roomUserNum++].text = mainCtrl.GetUserName(); }