在编译我的程序时(我从 MonoDevelop IDE 编译它)我收到一个错误:
错误 CS0121:以下方法或属性之间的调用不明确:
System.Threading.Thread.Thread(System.Threading.ThreadStart)' and
System.Threading.Thread.Thread(System.Threading.ParameterizedThreadStart)' (CS0121)
这里是代码的一部分。
Thread thread = new Thread(delegate {
try
{
Helper.CopyFolder(from, to);
Helper.RunProgram("chown", "-R www-data:www-data " + to);
}
catch (Exception exception)
{
Helper.DeactivateThread(Thread.CurrentThread.Name);
}
Helper.DeactivateThread(Thread.CurrentThread.Name);
});
thread.IsBackground = true;
thread.Priority = ThreadPriority.Lowest;
thread.Name = name;
thread.Start();