>. Now you have direct access to the players via the <code>myNetWorker.Players</code> getter, however it is not thread safe to just simply access them in this way; you instead will lock them as seen in the following:</p>
<h3 id="locking">Locking</h3>
<pre><code class="csharp">lock (myNetWorker.Players)
{
    // Do your player iteration logic here
}
</code></pre>

<p>The second way would be to use the <strong>NetWorker::IteratePlayers</strong> method as described above. There are two ways that you can do thi