Information générale
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Network:
Windows 2008 Server
>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement