C# - Insert into Array List
<p>In the Insert Into ArrayList button’s click event handler, check to see if the user has: Entered a position in the Position textbox. Entered an actor’s name in the Actor Name textbox.</p>

<p>Check these textboxes to see if the user has entered a value. Do not worry if the user has entered an incorrect value, just that they have entered a value. If no text has been entered display relevant error messages in message box format and exit the method so no further processing takes place.  </p>

<p>Follow this with a call to InsertIntoArrayList, passing these values and causing the insertion of the new value into the ArrayList.  </p>

<p>Finally, call PopulateActors to update its items to reflect the change. </p>

<p>My code so far is not inserting into the array:</p>

<pre><code> private void btnInsert_Click(object sender, EventArgs e)
        {            

            if (string.IsNullOrEmpty(txtPosition.Text))
            {
                MessageBox.Show("Please enter a Position");
                return;
            }
            if (string.IsNullOrEmpty(txtActorName.Text))
            {
                MessageBox.Show("Please enter an Actor Name");
                return;
            }

            InsertIntoArrayList(txtActorName.Text, Position);
            PopulateActors();
        }        
</code></pre>

<p>And the Methods used are:</p>

<pre><code>void InsertIntoArrayList(string txtActorName, int txtPosition)
            {

            ArrayList ActorArrayList = new ArrayList();

            ActorArrayList.Insert(txtActorName, txtPosition);

            }
</code></pre>

<p>And:</p>

<pre><code>void PopulateActors()
            {
                cboActor.Items.Clear();

                foreach (string Actor in ActorArrayList)
                {
                    cboActor.Items.Add(Actor);
                }
            }
</code></pre>

<p>Newbie Coder!
Cheers for your help :)</p>