Solved

name of class

Posted on 2012-03-30
4
363 Views
Last Modified: 2012-03-30
Suppose I have a class called :  

Partial Public Class ShowTds_admin_agencyTable
end class


Is there a way to programmatically, at runtime, obtain the name of the class?
0
Comment
Question by:HLRosenberger
  • 2
  • 2
4 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 37788789
Obtain it from what? An instance of the class? If so, you would use Reflection.

e.g.

Dim x As New ShowTds_admin_agencyTable
Dim className As String = x.GetType().Name

Open in new window

0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 37788852
Yes!  That's what I want.   Now, what about the name of the parent class, if the class is inherited?
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 37788956
Dim parentName As String = x.GetType().BaseType.Name

Open in new window

0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 37788972
Thanks so much!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question