Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting method in sub class
Message
From
31/03/2015 12:15:04
 
 
To
31/03/2015 11:58:18
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01617154
Message ID:
01617508
Views:
19
>>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.....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform