如何在运行时获取VB6中的对象的类型(名称作为字符串就足够了)? 即是这样的: If Typeof(foobar) = "CommandButton" Then ...
/编辑:澄清,我需要检查动态类型的对象。举个例子: Dim y As Object
Set y = CreateObject("SomeType")
Debug.Print(<The type name of> y)
Ryan Delucchi问评论#3 here到Tom Hawtin的回答是: 为什么Class.newInstance() “恶”? 这个响应代码示例: // Avoid Class.newInstance, for it is evil.
Constructor<? extends Runnable> ctor = runClass.getConstructor();
Runnable d