Re: is a byte array Byte[] pass by reference
- From: "Alberto Poblacion" <earthling-quitaestoparacontestar@xxxxxxxxxxxxx>
- Date: Fri, 11 May 2007 11:04:32 +0200
"Peted" wrote in message news:leb843l7vshsb75msa78dkrv55fjvul7ue@xxxxxxxxxx
somemethod(Byte [] array);
is the byte array passed by method or by reference ? or do you have to
use the ref keyword to be able to mod the contents of the orig array
from inside the method ?
Without using "ref", if you modify array[i] inside somemethod, the corresponding position is modified in the original array. If you use a "ref" keyword, then you would be passing "a reference to the reference", which would allow you to point the received reference somewhere else (moving the array to a different array), besides allowing you to merely modify the contents.
.
- References:
- is a byte array Byte[] pass by reference
- From: Peted
- is a byte array Byte[] pass by reference
- Prev by Date: Re: Outlook object
- Next by Date: Re: is a byte array Byte[] pass by reference
- Previous by thread: Re: is a byte array Byte[] pass by reference
- Next by thread: Re: is a byte array Byte[] pass by reference
- Index(es):
Relevant Pages
|