Change Standard from ByVal to ByRef 
Author Message
 Change Standard from ByVal to ByRef

Ist it possible to change the standard from ByVal to ByRef
when writing new functions?

Best regards,
FAUSER AG
Marc Fauser

........................................................
FAUSER AG

Gutenbergstr. 5
82205 Gilching

Fon:    +49 (0)8105 / 26790
Fax:    +49 (0)8105 / 26797
Web:   http://www.*-*-*.com/
........................................................

[gem. Par.28Abs.3 BDSG ist die Verwendung der Adresse fr Werbung untersagt]



Wed, 08 Dec 2004 21:16:05 GMT  
 Change Standard from ByVal to ByRef
Are you sure that's what you want to do, because passing reference types by
val already passes a reference to your objects.


Quote:
> Ist it possible to change the standard from ByVal to ByRef
> when writing new functions?

> Best regards,
> FAUSER AG
> Marc Fauser

> ........................................................
> FAUSER AG

> Gutenbergstr. 5
> 82205 Gilching

> Fon:    +49 (0)8105 / 26790
> Fax:    +49 (0)8105 / 26797
> Web:   http://www.fauser-ag.com
> ........................................................

> [gem. Par.28Abs.3 BDSG ist die Verwendung der Adresse fr Werbung
untersagt]



Thu, 09 Dec 2004 18:27:32 GMT  
 Change Standard from ByVal to ByRef

Quote:

> Are you sure that's what you want to do, because passing reference types by
> val already passes a reference to your objects.

I often have large data in memory. Around 500-700 MB in one array.
I have some functions which calcualtes a result, based on the array.
And it's stupid to always pass a variable byval. And I don't want
to change it to byref every time.

Marc



Thu, 09 Dec 2004 19:13:24 GMT  
 Change Standard from ByVal to ByRef

Quote:



> > Are you sure that's what you want to do, because passing
> > reference types by val already passes a reference to your
> > objects.

> I often have large data in memory. Around 500-700 MB in one array.

You're sure that it's ok?

Quote:
> I have some functions which calcualtes a result, based on the
> array. And it's stupid to always pass a variable byval.

It's not stupid. You should have a look at the differences between reference
and value types. If you pass an array ByVal, you do *not* pass a copy of the
content of array! You only pass a copy of the reference to the array.

Quote:
> And I
> don't want to change it to byref every time.

You don't have to.

Armin



Thu, 09 Dec 2004 19:27:12 GMT  
 Change Standard from ByVal to ByRef

Quote:




> > > Are you sure that's what you want to do, because passing
> > > reference types by val already passes a reference to your
> > > objects.

> > I often have large data in memory. Around 500-700 MB in one array.

> You're sure that it's ok?

> > I have some functions which calcualtes a result, based on the
> > array. And it's stupid to always pass a variable byval.

> It's not stupid. You should have a look at the differences between reference
> and value types. If you pass an array ByVal, you do *not* pass a copy of the
> content of array! You only pass a copy of the reference to the array.

Yes. Your are right. I made a mistake on my last tests. Sorry.

Marc



Thu, 09 Dec 2004 23:06:14 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Override ByRef with ByVal

2. ByVal / ByRef

3. byVal vs ByRef

4. Questions regarding objects, assignments, byval, byref, etc...

5. Event Arguments : ByRef or ByVal (Which Best)?

6. Peformance in VB.NET - ByRef and ByVal

7. objects byval and byref

8. ByRef And ByVal for Object

9. byval / byref

10. ByRef and ByVal

11. Pass arguments ByVal or ByRef

12. ByVal vs ByRef

 

 
Powered by phpBB® Forum Software