Efficiently convert Base 1 Array to Base 0 Array?
- From: "Peter Nofelt" <pcnofelt@xxxxxxxxx>
- Date: 8 Feb 2006 07:44:50 -0800
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
.
- Follow-Ups:
- Re: Efficiently convert Base 1 Array to Base 0 Array?
- From: Chris Dunaway
- Re: Efficiently convert Base 1 Array to Base 0 Array?
- Prev by Date: Re: Sync build number for all assemblies
- Next by Date: Re: question refined - Copy file from client to server
- Previous by thread: Do I need AOP patern?
- Next by thread: Re: Efficiently convert Base 1 Array to Base 0 Array?
- Index(es):
Relevant Pages
|