chowchow Posted August 12, 2006 at 12:52 PM Report #43925 Posted August 12, 2006 at 12:52 PM Ola! Duvida de C#: Tenho um array de pontos e quero passar para uma ArrayList. Estou a usar a seguinte funcao: public ArrayList ArrayToArraylist(Point[] aux) { ArrayList list=new ArrayList(); for(int i=0;i<list.Count;i++) { list(i) =aux(i) ; } return list; } No entanto, quando peço para imprimir os elementos da "list", o resultado vem em branco ...
Mythos Posted August 12, 2006 at 01:54 PM Report #43931 Posted August 12, 2006 at 01:54 PM Olá, seria algo do género: public ArrayList ArrayToArraylist( Point[] aux ) { ArrayList list = new ArrayList(); for( int i = 0; i < aux.Length; i++ ) list.Add( aux[i] ); return list; } My 2 cents 😄
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now