title: How to generate array of unique number in VB.net?
body: <p>I need to implement a function that generates arrays of an unique combination number?
  This function will be accessible by a lot of devices (by using threads), and each device should get an unique address id (array of sbyte).</p>
  
  <p>I previously used a function in C# to generate an unique number but I don't know how to implement this new case in VB.net.</p>
  
  <pre><code>public class GetUniqueNumber
  {
      static private  int id = 0;
      static private final Object lock = new Object();
  
  
      public int getId()
      {
          synchronized (lock)
         {
              int temp = id;
              id++;
              return temp;
          }
      }
  }
  </code></pre>