Arrays. Use'm or lose'm
Arrays used to be hard. Oh hell. They're still hard. Array[] verses ArrayList? Use one when? What??? The double brackets go with the object type, not the variable? Curlies around the declaration, not parentheses?
But still, they pass multiple values real good!
We'll pass three strings from a method: a list of user IDs, the emails of those users, and the users' names. I was going to create a quick data structure, which would have been preferrable for strongly typed use, but I wanted to use the array. Pretty ecomonical, actually.
public string[] GetTeamStuff()
{
team_ids = "1,2,3";
string[] Team =
{
team_ids,
Users.GetEmails(team_ids).
Users.GetNames(team_ids),
};
return Team;
}
and used as
txtTeamEmails.Text = GetTeamStuff()[1];