Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP inlist() in c#
Message
De
03/10/2008 13:21:55
 
 
À
03/10/2008 12:57:46
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01320903
Message ID:
01352609
Vues:
41
>>I don't think there should be a performance issue. Given:
>>   public static class MyExtensions
>>    {
>>        public static string AddOn(this string s, string s1)
>>        {
>>            return s + s1;
>>        }
>>    }
then
string str = "Hello".AddOn(" Fred");
is just syntatic sugar for
string str = MyExtensions.AddOn("Hello", " Fred");
i.e. as far as the compiler is concerned they are identical

>
>
>
>Actually, I didn't see how there could be any performance issues either ... the guy who told me this though is usually pretty astute about such things, which is why I wondered about it. Could be that he was wrong. ;-)
>
>~~Bonnie

Bonnie,

There might be a very small performance penalty to pay. But that is nothing compared to what we receive in return
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform