|
-
Apr 18th, 2006, 08:48 AM
#1
Thread Starter
Hyperactive Member
[3.0/LINQ] confused about passing arrays (byval or byref)
I was working on an example given from a book and I totally got confused.
Please correct me.
I was under the impression that in c# the default way of passing arrays (like any other element) is "byval".
If we don't mention any thing when passing an array to a method, what is the default way?
like
int[] firstarray = {32,33,34};
firstdouble(firstarray);
what is the difference between this way versus this way?
int[] secondarray = {22,23,22};
seconddouble(ref secondarray);
thanks
nath
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|