title: How can I access a element of a IReadOnlyCollection through it index?
body: <p>I am working with selenium and I am using the function FindElements so I am getting a element that implements IReadOnlyCollection interface. I want to iterate through the list but it seems that IReadOnlyCollection doesnt have any method like Get(int index) or a implementation of the operation [].</p>
  
  <p>I want to avoid transforming the result to a List or to an array since I just want to access the elements to read them.</p>
  
  <p>Currently I don't want to use a foreach since I need to manage an index so I can add those elements to an another array.</p>
  
  <p>This is what I want to do:</p>
  
  <pre><code>public void fillMatrix(){
      IReadOnlyCollection&lt;IWebElement&gt; rows = Driver.FindElements(By.XPath("./*/tr"));            
          IReadOnlyCollection&lt;IWebElement&gt; elements;
          matrix = new IControl[rows.Count()][];
          for(int i = 0; i &lt; matrix.Count(); ++i){
              matrix[i] = rows[i].FinElements("./td").toArray();                
          }    
  }
  </code></pre>
  
  <p>Thanks</p>