Re: sub-array references?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
.



Relevant Pages

  • Sites web service in C++
    ... the first problem i run into is that wrapper class fails to compile. ... i read somewhere that its not necessary to pass a reference to a gc type ... array, because in MC++ they're always passed by reference. ... // get the Site Templates ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Marshalling a structure of TCHARs
    ... marshal a byte array of the entire length of the LAN credentials. ... create a wrapper class that has string properties that set/get the text at ... "Jared Miniman" wrote in message ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: Sites web service in C++
    ... I think the generated wrapper code is incorrect. ... > the first problem i run into is that wrapper class fails to compile. ... > array, because in MC++ they're always passed by reference. ... > // get the Site Templates ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: C# fixed keyword explaination
    ... Since Arrays are considered a type in .NET - the entire object of the Array ... "coz" wrote in message ... The Wrapper class will be instantiated in a VB .NET application ... private static extern uint CDllRead(uint Offset, uintArray, uint ...
    (microsoft.public.dotnet.languages.csharp)
  • C# fixed keyword explaination
    ... prevent the "ENTIRE ARRAY" from being moved, not just the first array ... The Wrapper class will be instantiated in a VB .NET application ...
    (microsoft.public.dotnet.languages.csharp)