Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
No Overload takes 5 arguments
Message
De
23/09/2013 08:51:29
 
 
À
23/09/2013 08:18:06
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01583574
Message ID:
01583873
Vues:
31
>
>Oh well, another argument bites the dust :-}

If that is what it takes to learn something - why not


>What if the called method is in a different app domain ?

Dunno

>IAC, I'd stiil argue that using 'out' rather than 'ref' gives a clear indication to the caller of the behaviour of the method - i.e 'don't bother passing in an object because it don't mean nothin'

I agree - it's (1) clearer, and (2) I cannot recall passing something by ref that did not mean out

In the example of LotsOfDoubles, passing by ref actually outperforms passing by value
The call = copy 80 bytes, returning = copy 80 bytes onto the stack and copy 80 from the stack to the variable
LotsOfDoubles x = new LotsOfDoubles()

x = Method(x)
Guess that's why they say to keep the structs down to 16 bytes in size
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform