-
May 28th, 2010, 01:28 AM
#1
How to find the base class on object?
Hello all,
In one of my work I have a situation as explained below....
I have an object. I am able to find the type of the object using Gettype() method.
But to work out my logic, I want to find what is the base class of the object?
I there any way we can do this in c#? If so, Please help me...
Regards
RadKrish
-
May 28th, 2010, 03:31 AM
#2
Re: How to find the base class on object?
Look for methods or properties with'base' in the name on the type object
www.monotorrent.com For all your .NET bittorrent needs
NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.
-
May 28th, 2010, 04:05 AM
#3
Re: How to find the base class on object?
I just tried this and it worked....
ObjecM.GetType().BaseType
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|