你好我有这个代码:
private void button1_Click(object sender, EventArgs e)
{
if (radioButton1.Checked)
{
UDP.startflood(textBox1.Text, Convert.ToInt32(textBox3.Text), int.Parse(textBox4.Text), int.Parse(textBox2.Text), int.Parse(textBox5.Text));
}
}
我收到错误“名称空间 UDP 中不存在类型或名称空间名称 startflood(您是否缺少程序集引用?)”
这是我的 UDP.cs 的一部分:
public Thread[] Sockets;
public string _Host;
public int _Delay;
public int _Sockets;
public int _Port;
public int _Timeout;
public void startflood(string Host, Int32 Delay, int Socketss, int Port, int Timeout)
{
_Host = Host;
_Delay = Delay;
_Sockets = Socketss;
_Port = Port;
_Timeout = Timeout;
Sockets = new Thread[_Sockets];
for (int i = 0; i < _Sockets; i++)
{
Sockets[i] = new Thread(this.flood);
Sockets[i].IsBackground = true;
Sockets[i].Start();
}
}
public void flood()
{
i have some code here
}
请问有人可以帮我吗?谢谢你。