Solved

name of class

Posted on 2012-03-30
4
333 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 74

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 74

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now