title: How to generate random IPv6 in C#?
body: <p>I'm new to coding. I need to know how to generate random IPv6 in C Sharp.
  I found this code which generated random IPv4, how can i alter it for IPv6?</p>
  
  <pre><code>static string GenerateIP()
      {
          // generate an IP in the range [50-220].[10-100].[1-255].[1-255]
          return RNG.Next(50, 220).ToString() + "." + RNG.Next(10, 100).ToString() + "." + RNG.Next(1, 255).ToString() + "." + RNG.Next(1, 255).ToString();
      }
  }
  
  class RNG
  {
      private static Random _rng = new Random();
  
      public static int Next(int min, int max)
      {
          return _rng.Next(min, max);
      }
  </code></pre>