title: How to randomly choose 0 or 1 vb.net
body: <p>I want to make a generator that will show results in text box , i want it to randomly choose  0 or 1 , how can i make that ? </p>
  
  <p>Kode that works :</p>
  
  <pre><code>Public Class Form1
  Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
  
  Dim r as New Random()
  Dim n As Integer = r.Next(2)
  TextBox1.Text = CStr(n) 
  
      End Sub
  End Class
  </code></pre>