title: Array index is not accessable because it is Friend
body: <p>I am getting and error when I bring my code into another project. In a blank project it works fine, I really have no idea how to get around it, here is the error</p>
  
  <p>Error   1   'System.Data.Index' is not accessible in this context because it is 'Friend'.</p>
  
  <pre><code>        Dim DataString As String = txtAdvancedCommand.Text
      ' Create an array containing from each letter in Textbox
      Dim charArray() As Char = DataString.ToCharArray
  
      For index = 0 To charArray.GetUpperBound(0)      &lt;-----ERROR on word index
          Try
              'Now lets send the data
              If SerialPort.IsOpen Then
                  SerialPort.Write(charArray(index) &amp; vbCrLf)    &lt;-----ERROR on word index
              Else
                  ConnectSerial()
                  SerialPort.Write(charArray(index) &amp; vbCrLf)    &lt;-----ERROR on word index
              End If
          Catch e As Exception
              txtLog.AppendText(e.Message &amp; vbCrLf)
          End Try
      Next
  </code></pre>
  
  <p>now the project I am bringing into has a DLL and I suspect it has something to do with it, I cannot get the source code to the DLL so is there another way around this?</p>