Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting method in sub class
Message
De
31/03/2015 12:15:04
 
 
À
31/03/2015 11:58:18
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01617154
Message ID:
01617508
Vues:
18
>>Could be. But in that case there would be no point in looping. If the initial BaseType wasn't object then you'd know it was a child class.
>
>So, just so I understand, can you explain more on the suggesting change you mentioned? Basically, what would be a scenario of failure with the actual loop condition with that original code compare to what you suggest.

Your original code would always return true since the DeclaringType would never be of type object - i.e. it would return true if the method implementation was only in the root class and not being overridden.....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform