小编bit*_*ave的帖子

来自object的GetType返回RuntimeType

我有一个简单的功能:

public string getType(object obj){
Type type = obj.getType();
return type.FullName;
}
Run Code Online (Sandbox Code Playgroud)

如果对在运行时创建的字符串对象使用此函数,则该函数返回"System.RuntimeType"...

但它应该返回"System.String"...

c#

8
推荐指数
1
解决办法
9145
查看次数

标签 统计

c# ×1