如何读取C#object的值

2025-04-14 13:34:41
推荐回答(1个)
回答1:

int k=2;
object o=k;
int d=(int)o;

要获取object的值,你要知道,原来是什么类型。进行转换就行了。