title: Pairs from a list of string in vb.net
body: <p>I'm trying to pair elements of a list of string together, ie, out of a list of a,b,c,d; I'd like to see ab, bc, cd. Here's the code I have so far:</p>
  
  <pre><code>    Dim C As New List(Of String)
      For i = 0 To S.Count - 1
          For j =i + 1 To S.Count - 1
              C.Add("{" &amp; S(i) &amp; "," &amp; S(j) &amp; "}")
          Next
      Next
      Dim value As String = String.Join(",", C)
      TextBox2.Text = value
  </code></pre>
  
  <p>Currently, this code returns a power set of {a,b},{a,c},{a,d},{b,c},{b,d},{c,d}..</p>
  
  <p>Is there an efficient way to do this? </p>