摘要:
今天看到hbb0b0的一个帖子:如何用反射实现如下的泛型方法调用?, 询问如何获取一个重载的泛型方法。因为Type没有提供GetGenericMethod方法,调用GetMethod可能会抛出一个AmbiguousMatchException异常或者无法获得正确的泛型方法。本文提供一种途径,通过查询Type所有的Method找到正确的方法。1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Linq;4usingSystem.Text;5usingSystem.Reflection;67namespaceCom.Colobu.D 阅读全文
posted @ 2009-09-28 11:00
反正我信了
阅读(398)
评论(0)
推荐(0)
浙公网安备 33010602011771号