Here is your code with a critique which includes some of the comments made by others above. Note that where I've commented out a line of code and replaced it with an alternative suggestion I would normally just edit or delete the original
private const int MAX_ITEMS = 10;
private double[] numArray = new double[MAX_ITEMS];
private int index = 0;
private void button1_Click(object sender, EventArgs e)
{
if (this.index < numArray.GetUpperBound(0))
{
double dnum;
if (double.TryParse(textBox1.Text, out dnum))
{
numArray[this.index++] = dnum;
textBox1.Text = "";
}
}
}
private void button2_Click(object sender, EventArgs e)
{
for(int i = 0; i <= numArray.GetUpperBound(0); i++)
{
if(i < index)
listBox1.Items.Add(numArray[i]);
}
}
}
In terms of sites to learn C# Sergey gave an excellent suggestion which I'm only repeating here for ease of linking
http://msdn.microsoft.com/en-us/vstudio/hh341490.aspx[
^]
There are many others but be warned they can be of varying quality... there are sites that come up first in Google searches that aren't necessarily the best.
Good luck and keep trying!