public string[] bob ()
{
string [] averages = new string[2];
averages[0] = value1.Text;
averages[1] = value2.Text;
return averages;
}
private void button1_Click(object sender, EventArgs e)
{
string[] bobResult = bob();
label1.Text = bobResult[1];
}
This is one solution to your question. The method "bob" returns string array. In the button1_Click method the result from "bob" call is assigned to variable with type string[] and name bobResult.