Thread View: borland.public.delphi.language.delphi.dotnet
2 messages
2 total messages
Started by Stephen Boyd
Tue, 15 Jul 2008 19:47
Array properties with variable number of indices
Author: Stephen Boyd
Date: Tue, 15 Jul 2008 19:47
Date: Tue, 15 Jul 2008 19:47
15 lines
1373 bytes
1373 bytes
I want to be able to create an array property with a variable number of indices. The intention is to provide a dynamic array like property for a class where the underlying data structure is not an array. I have come up with this way of doing it: property MyProp[idx: array of Integer]: Integer read GetMyProp; This works fine, but the code to retrieve an instance of MyProp is a bit cumbersome. i := MyObject.MyProp[[1, 2, 3]]; // note the double brackets I was wondering if anyone knew of a better way of doing this.
Re: Array properties with variable number of indices
Author: Remy Lebeau (TeamB)
Date: Tue, 15 Jul 2008 23:45
Date: Tue, 15 Jul 2008 23:45
10 lines
1120 bytes
1120 bytes
"Stephen Boyd" <sboydlns@gmail.com> wrote in message news:487cfedc$1@newsgroups.borland.com... > I was wondering if anyone knew of a better way of doing this. Nope. Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads