How can I return 2 Lists or Arrays from a function?
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Bruce RoeserPosted Jul 5, 2010, 12:02 PM
-b
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace LangTest {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private void btnTwoArray_Click(object sender, EventArgs e) {
ArrayList ar1, ar2;
ar1 = new ArrayList();
ar2 = new ArrayList();
FillArrays(ar1, ar2);
for (int i=0; i
}
for (int i=0; i
}
}
private void FillArrays(ArrayList ar1, ArrayList ar2) {
ar1.Add("A");
ar1.Add("B");
ar1.Add("C");
ar2.Add("X");
ar2.Add("Y");
ar2.Add("Z");
}
}
}
Sam HobbsPosted Jul 5, 2010, 7:09 PM