Re: sub-array references?
- From: Scott C <sdcoonce@xxxxxxxxxxxxx>
- Date: Thu, 23 Feb 2006 08:16:56 +0100
Bruce Wood wrote:
Sorry... I should clarify.
The wrapper class would contain a reference to the array, a start
index, and an artificial length. Any functionality that the wrapper
were to export would act as though the array started with the indicated
element and were limited to the fake length.
Unfortunately, you couldn't then pass it off as an int[], for example,
because you can't inherit from "int[]"... at least, not as far as I
know. Your functions would have to be declared so that either a real
array or the wrapper were acceptable arguments.
Just an idea, but couldn't you make an explicit or implicit (heaven forbid) conversion from this wrapper class to an int[] or whatever, and make a new int[] when the conversion is needed? sucks for performance, but seems like it might work.
Scott
.
- Follow-Ups:
- Re: sub-array references?
- From: Bruce Wood
- Re: sub-array references?
- References:
- sub-array references?
- From: Kresimir Spes
- Re: sub-array references?
- From: Bruce Wood
- Re: sub-array references?
- From: Bruce Wood
- sub-array references?
- Prev by Date: how to make dropdown list flat in asp.net
- Next by Date: Re: Deploy Crystal Report 9.
- Previous by thread: Re: sub-array references?
- Next by thread: Re: sub-array references?
- Index(es):
Relevant Pages
|