我有这个类:
public class Statistics
{
List<string> _lsit;
public List<string> ipList
{
get { return _lsit; }
set { _lsit = value; }
}
string _Path = @"C:\Program Files\myApp.exe";
string _Path = "";
ProcessStartInfo ps = null;
public getStatistics(string Path)
{
_Path = Path;
getStatistics();
}
}
我想使用不同的Thead启动统计功能,我做了如下操作:
Statistics stat = new Statistics (some path);
Thread<List<string>> lList = new Thread<List<string>>(() => tsharkIps.getStatistics());
但编译器错误显示“非泛型类型'System.Threading.Thread'不能与类型参数一起使用”
我没有编写全部的类,只想知道如何启动线程
谢谢