Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP inlist() in c#
Message
De
03/10/2008 12:49:46
 
 
À
03/10/2008 11:18:19
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01320903
Message ID:
01352594
Vues:
38
Hi,

>Thanks for the link Tracy. He sure seems to indicate that there are no performance problems, although as Viv mentioned, he doesn't show the code he used for his benchmark test.

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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform