public class class1
{
...
Person p = new Person(_id);
Thead t = new Thead(new TheadStart(p.GetName));
t.start();
...
}public class Person
{
private string _id;
public Person(string id)
{
_id=id
}
public string GetName()
{
return _id+1;
}
}以上代码出错信息:方法GetName()与委托void system.thread.threadStart()不匹配。问题一:我这样传参数合理吗?
问题二:请问我怎么能得到新开线程的返回值呢?
{
...
Person p = new Person(_id);
Thead t = new Thead(new TheadStart(p.GetName));
t.start();
...
}public class Person
{
private string _id;
public Person(string id)
{
_id=id
}
public string GetName()
{
return _id+1;
}
}以上代码出错信息:方法GetName()与委托void system.thread.threadStart()不匹配。问题一:我这样传参数合理吗?
问题二:请问我怎么能得到新开线程的返回值呢?
解决方案 »
- 求解!使用guid类型后,objdatasource找不到id了!
- 这个SQL语句怎么优化
- [原创]C# 数据操作窗体实现增/删/改/查(图) (一)
- dataGridView1 让增加的新行 出现在第一行
- 如何在窗体上屏蔽掉右键?
- 找不到类型或命名空间名称“Server”(是否缺少 using 指令或程序集引用?)
- 讨论下b/s是不是没有c/s安全,解决安全问题的方法!
- 关于c# + MapX5.0的问题,在线等待...
- 在CSS之中,id前面紧加一个DIV是什么意思,起什么作用,如 div#placard
- C#窗体控件库引用dll后调用其中的类未实例化
- 关于ListView的问题
- 求解问题思路
{}
{
theValue = 100;
}