Efficiently convert Base 1 Array to Base 0 Array?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi all,

My scenario is as follows:

* Receive a base 1 array (index starts at 1 instead of 0) of data from
a COM component .
* Need to pass this array to a .net component that requires its array
index to start at 0.
* As a result, must convert array from base1 to base 0.

Currently my solution for this is to create a new array and copy the
contents of is as follows:
* Create new based 0 array
* Copy the content of base 1 array to new array by 1)iterating through
each element in base 1 array and 2)doing assignment to base 0 array.
* Assign new array to array used by .net component described above.

My question is as follows:
Is there a quicker way to convert a base1 array to base0 without
having to do iteration and assignment? Does something in the .net
framework already do this?

Thanks,
Peter
www.nofelt.com

.



Relevant Pages

  • Efficiently convert Base 1 Array to Base 0 Array?
    ... Need to pass this array to a .net component that requires its array ... each element in base 1 array and 2)doing assignment to base 0 array. ... Is there a quicker way to convert a base1 array to base0 without ...
    (microsoft.public.dotnet.languages.csharp)
  • Efficiently convert Base 1 Array to Base 0 Array?
    ... Need to pass this array to a .net component that requires its array ... each element in base 1 array and 2)doing assignment to base 0 array. ... Is there a quicker way to convert a base1 array to base0 without ...
    (microsoft.public.dotnet.csharp.general)
  • Re: Efficiently convert Base 1 Array to Base 0 Array?
    ... My scenario is as follows: ... Need to pass this array to a .net component that requires its array ... depending of the language you use. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: array lines shifting
    ... What is it ment to do? ... This is your array: ... What is the goal, the goal is, to rotate array rows, the ... There is an assignment to stored value ...
    (alt.comp.lang.learn.c-cpp)
  • Re: undefined vs. undefined (was: new Array() vs [])
    ... or to the array performance, I dared to move it to a new thread. ... And section 10.1.3 explains the assignment of the undefined value to ... to give a Reference type. ... var arr = ...
    (comp.lang.javascript)