title: Output an Array or List to String
body: <p>I wrote the following piece of code (in VBA in outlook) to try to output my list to a string. This way may not be perfect; it compiles, but I have not tested it yet; in any case, I'm wondering if any of you have any alternative ideas about how to go about outputting an array or a list to a string, either in VBA or VB.NET. This way just feels kind of jury-rigged to me, and I was not able to find any kind of 'standard' or 'official' way to get this done. </p>
  
  <p>It is not essential that I have an alternative as I think this code will work, but I am very new to this and I would like to learn as much as possible from this project. So thanks for any help you could offer!</p>
  
  <pre><code>    Dim nplct As Integer
      Dim npl As Integer
      Dim strNotpresentList As String
      strNotpresentList = ""
      npl = 0
      nplct = notpresentList.Count
      For Each Computer In notpresentList
          If npl &lt;&gt; nplct Then
  
              If strNotpresentList = "" Then
                      strNotpresentList = notpresentList(npl)
                      npl = npl + 1
                  Else
                      strNotpresentList = strNotpresentList &amp; ", " &amp; notpresentList(np1)
                      npl = npl + 1
                  End If
  
  
              Else
                  strNotpresentList = strNotpresentList &amp; ", " &amp; notpresentList(np1) &amp; "."
              End If
  
      Next Computer
  </code></pre>