On May 11, 9:50 am, Peted wrote:
> In the default state
>
> ie
>
> somemethod(Byte [] array);
>
> is the byte array passed by method or by reference ?
The *reference* to the byte array is passed by value.
> or do you have to use the ref keyword to be able to mod the
> contents of the orig array from inside the method ?
You can change the *contents* of the array just by passing the
reference by value.
If you want the method to be able to change it to a completely
different array (e.g. a different size) you'll need to pass the
parameter by reference.
See
http://pobox.com/~skeet/csharp/parameters.html
Jon