摘要:
有时候我们需要在动态运行的时候,转换一个对象的类型,这里提供一段小代码来完成这个工作: public class DynamicCastType{ static MethodInfo castMethod; public static object Cast(object obj, Type targetType) { if (castMethod == null... 阅读全文
posted @ 2012-05-17 12:55
tubo
阅读(1064)
评论(0)
推荐(0)

浙公网安备 33010602011771号