title: How to add or append value in array in Unity C#
body: <p>How can I create a string array in class?</p>
  
  <p>Also I have to add or append values to that array.</p>
  
  <p>I can use Firebase real-time database to store array values in database.</p>
  
  <p>Not to a specific key.</p>
  
  <p>I declared array as:</p>
  
  <pre><code>private string[] uiddata;
  </code></pre>
  
  <p>That array is useed in a for loop and add elements to the array as</p>
  
  <pre><code>public void Click()
  {
      _uid = int.Parse(_uidText.text);
  
      for(int i = 0; i &lt; uiddata.Length;i++)
      {
          uiddata.Add(_uid);
  
          //_score = int.Parse(_scoreText.text);
  
          _uidRef.SetValueAsync(_uid);
          //_scoreRef.SetValueAsync(_score);
  
          _uidRef.RunTransaction(data =&gt;
          {
              data.Value =_uid ;
              return TransactionResult.Success(data);
          }).ContinueWith(task =&gt;
          {
              if (task.Exception != null)
                  Debug.Log(task.Exception.ToString());
          });
      }
  }
  </code></pre>
  
  <p>In the script above I try to add my value in the array but gives this error:</p>
  
  <blockquote>
    <p>error CS1061: Type <code>string[]</code> does not contain a definition for <code>Add</code> and no extension method <code>Add</code> of type <code>string[]</code> could be found. Are you missing an assembly reference?</p>
  </blockquote>