Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C# version of VFP PEMSTATUS()
Message
De
19/01/2010 17:20:22
 
 
À
19/01/2010 16:15:55
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01444636
Message ID:
01444841
Vues:
40
>My favourite of
>
>>    protected override void OnTextChanged(EventArgs e)
>>    {
>>        if (this.Parent is IMyInterface)
>>        {
>>            ((IMyInterface)this.Parent).MyMethod(true);
>>        }
>>        base.OnTextChanged(e);
>>    }
>
>
>is
>
>>    protected override void OnTextChanged(EventArgs e)
>>    {
>          IMyInterface o;
>>        if ( ( o = this.Parent as IMyInterface) != null )
>>        {
>>           o.MyMethod(true);
>>        }
>>        base.OnTextChanged(e);
>>    }
>
Hmm. I defintely win on readability.
You might win on efficiency. Have you compared both in ILDASM ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform