获取盒装对象的类型名称c#

Vla*_*lad 4 c#

如何获取对象框中的实例的类型名称(以字符串形式).我不能使用is或as运算符.例如:

    object a= student1; //student1 is instance of Student class
Run Code Online (Sandbox Code Playgroud)

接下来我将在另一个库中获取它,其中没有Student类,也没有引用.我需要这样的东西:

string typeName=GetTypeNameInsideObject(obj1)
Run Code Online (Sandbox Code Playgroud)

谢谢

Vin*_*els 7

这应该做的伎俩:

a.GetType().Name
Run Code Online (Sandbox Code Playgroud)