C# Convert Type to T

不记坑,只记有效的代码

T temp = (T)Convert.ChangeType(obj, typeof(T));
posted @ 2021-11-29 15:34  MoonTwilight  阅读(296)  评论(0编辑  收藏  举报