I can appreciate what you are trying to do but you can't (and shouldn't try to) send a reference to "part of an array." In C#, arrays are objects, not pointers. That's an important distinction. Sending a reference to "part of an object" just doesn't make sense.
How should "part of an object" act when you pass it to a method?
- What would array.Length return?
- What if the called method sorts the array (just it's part of the array)?
- What if the array is self-referential (i.e. array elements references other parts of the array)? Are you somehow "locked out" of accessing array elements not passed into the method?
- Does the called method now need to check a flag to know if they have the "full object?" That would break a lot of existing code.
If your method needs only part of the array (and you don't want to create a local copy), the best solution would be to pass the array reference and any other information you need to access the portion you need.
Enjoy,
Robert C. Cartaino