 <p>You put everything in a loop. Why? You should use the loop only to check whether the username is taken or not and send your messages outside of it. </p> <p>First of all you'd like to force your loop to work only as long as it should. You can do it by declaring <code>isUsed</code> before it and adding it to the condition. Then, in the loop, you only check whether the name is taken and change the value of your variable. The loop will either iterate through all the clients or end when it encounters the first name that matches your condition. When the loop is over, you should decide which command you send basing on the results.</p> <pre><code>bool isUsed = false; for (int i = 0; i &lt; clientsInfoList.Count &amp;&amp; !isUsed; i++) { isUsed = String.Equals(clientsInfoList[i].Item3, Username); } if (isUsed) { Console.WriteLine("Username is already used!"); udpServer.Send(Encoding.ASCII.GetBytes("REFUSED"), Encoding.ASCII.GetByteCount("REFUSED"), remoteEP); } else { clientsInfoList.Add(new Tuple&lt;int, IPEndPoint, string&gt;(id, remoteEP, Username)); Console.WriteLine("Username has been added to the list :)"); udpServer.Send(Encoding.ASCII.GetBytes("ACCEPTED"), Encoding.ASCII.GetByteCount("ACCEPTED"), remoteEP); } </code></pre>