hi how is it possible to return an array from this:
private void btnResult_Click(object sender, EventArgs e)
{
ArrayList arlist = new ArrayList();
arlist.Add(examResults);
return arlist;
}
Many Thanks
hi how is it possible to return an array from this:
private void btnResult_Click(object sender, EventArgs e)
{
ArrayList arlist = new ArrayList();
arlist.Add(examResults);
return arlist;
}
Many Thanks
You can't; an event handler cannot return a value. An event can potentially invoke many methods in different objects, if the event handlers allowed return values, each could potentially return a different value so your event would have multiple return values.
Where are you trying to "return" the arraylist to? What were you hoping to achieve, as i think you may have misunderstood how the return is being handled.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.