"Susan" <Su***@discussions.microsoft.com> wrote in message
news:52**********************************@microsof t.com...
In C++ you could do something like
int[] key = something;
functionCall (key+1);
Where the array key would be sent in but the 0 position in the function
call
would be the first position in the key array. Is there a way to do this in
C#
without creating a temp array to send in to the functionCall?
Thank you,
Susan
No. You can't have references/pointers to anything other than the start of
an object [except see "fixed" and C# pointers which you shouldn't normlly
use]
The cleanest and most general way to do this is to have your function take
an IList<int> and create a delegate class too expose part of your array as
an IList<int>
The most efficient way is to pass start-index and length as well as the
array.