you may use ArrayList (From System.Collections)
Juan C. Olivares
----- Original Message -----
From: "Santiago Erquicia" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 12:49 AM
Subject: [Mono-list] compile problem and indexer resizing
> I'm new to C# and programing in general. I was trying to resize an
indexer
> (by the way, does anybody know how to do that?) and when I tried to
compile
> it, my CPU usage jumped to 98% and never ended.
>
> This is the code:
>
> class AccountList
> {
> private Account[] myAccounts;
> private int last;
>
> public AccountList(int length)
> {
> this.myAccounts = new Account[length];
> }
>
> /* Indexer */
> public Account this[int index]
> {
> get
> {
> return myAccounts[index];
> }
> }
>
> public int Add (Account account)
> {
> myAccounts[].Add(account);
> return this.last;
> }
> }
>
> Does anyone knows if this is wrong? If it is, shoudn't the compiler say
> something?
>
> Thanks,
> Santiago
> _______________________________________________
> Mono-list maillist - [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
_______________________________________________
Mono-list maillist - [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list