110,538
社区成员
发帖
与我相关
我的任务
分享
static void Main(string[] args)
{
AAAA<string>(new List<string>());
}
public static void AAAA<TSource>(IList<TSource> AList)
{
Type t = Type.GetType(Regex.Match(AList.GetType().FullName.Replace("[[", "[").Replace("]]", "]"), @"\[(?<type>[^\]]+)\]").Groups["type"].Value);
Console.WriteLine(t.FullName);
}
public void AAAA<T>(IList<TSource> AList)
{
Type t = AList.GetType();
if (t is 你要判断的类型)
{
//执行
}