【发布时间】:2012-12-26 08:08:39
【问题描述】:
在c#中,我们可以在做其他事情之前确定一个List持有什么类型吗?示例:
List<int> listing = new List<int>();
if(listing is int)
{
// if List use <int> type, do this...
}
else if(listing is string)
{
// if List use <string> type, do this...
}
【问题讨论】: