VB.NET:获取实例的类名 [英] VB.NET: Get class name of a instance

查看:89
本文介绍了VB.NET:获取实例的类名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过VB.NET获取实例的类名?

Is there a way to get the instance's class name with VB.NET?

推荐答案

Dim type As Type = yourObject.GetType()
Dim typeName As String = type.FullName

全名将为您提供Type的全限定名称,包括Type的名称空间.

Full name will get you the fully qualified name of the Type, including the namespace of the Type.

请参见 MSDN 有关Type可用功能的更多信息.

See MSDN for more information on what is available with Type.

这篇关于VB.NET:获取实例的类名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆