title: Need to add and find element index value in arraylist in powershell?
body: <p>add string element in arraylist and find it's index value?</p>
  
  <pre><code>[code...]
  $eventList = New-Object System.Collections.ArrayList
  $eventList.Add("Hello")
  $eventList.Add("test")
  $eventList.Add("hi")
  </code></pre>
  
  <p>Not working throwing error:-</p>
  
  <pre><code>Method invocation failed because [System.String[]] doesn't contain a method named 'Add'.
  At C:\Users\Administrator\Desktop\qwedqwe.ps1:9 char:15
  + $eventList.Add &lt;&lt;&lt;&lt; ("Hello")
      + CategoryInfo          : InvalidOperation: (Add:String) [], RuntimeException
      + FullyQualifiedErrorId : MethodNotFound
  </code></pre>