title: Power Set Algorithm In VB.NET Is it Possible?
body: <p>I am making a program that user will input a set of elements example: "abcd"
  and display an output {a}{b}{c}{a,b}{a,c}{b,c}</p>
  
  <p>I know it is possible in C++ and java but i stopped when i got problems with VB.net</p>
  
  <p>Is my method correct? Or should I go with for loops? Please help</p>
  
  <p>This is my code so far</p>
  
  <pre><code>Public Class Form3
  
      Friend X As Integer
  
      Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
  
          If txtelements.Text = String.Empty Then
              MessageBox.Show("Please Input an element")
          Else
  
              Dim i As Integer = 0
  
                  X = txtelements.Text.Length
                  If i &gt; X Then
                      Dim Chars As Char() = txtelements.Text.ToCharArray()
  
                  MessageBox.Show("{" &amp; Chars(i) &amp; "}")
                  i = i + 1
              Else
  
              End If
          End If
      End Sub
  
  End Class
  </code></pre>