【发布时间】:2021-12-10 19:57:12
【问题描述】:
请这里的任何人可以帮助我解决这个问题
checked
{
foreach (string text2 in ParametersString)
{
int num = Conversions.ToInteger((!Versioned.IsNumeric(text2)) ? -1 : text2);
if (num == -1)
{
Interaction.MsgBox(string.Format("Entering characters is not allowed ---> {0}", text2), MsgBoxStyle.Critical, Class10.string_4);
}
else if (!this.method_2(num))
{
Interaction.MsgBox(string.Format("The specified port ({0}) is already in use", text2), MsgBoxStyle.Critical, Class10.string_4);
Environment.Exit(0);
}
else
{
this.Listener = new TcpListener(IPAddress.Any, num);
this.Listener.Server.SendTimeout = -1;
this.Listener.Server.ReceiveTimeout = -1;
this.Listener.Server.SendBufferSize = 999999;
this.Listener.Server.ReceiveBufferSize = 999999;
this.Listener.Start();
int num2 = 5;
string string_ = Class7.string_0;
if (Operators.CompareString(string_, "High", false) != 0)
{
if (Operators.CompareString(string_, "Normal", false) == 0)
{
num2 = 10;
}
else if (Operators.CompareString(string_, "Low", false) == 0)
{
num2 = 5;
}
}
else
{
num2 = 16;
}
int num3 = num2;
for (int j = 1; j <= num3; j++)
{
new Thread(new ThreadStart(this.ScanerAsync)).Start();
}
int num4 = num2;
for (int k = 1; k <= num4; k++)
{
new Thread(new ThreadStart(this.method_1)).Start();
}
text += Conversions.ToString(num);
this.closing = false;
}
}
Class6.string_0 = text;
}
线路错误
int num = Conversions.ToInteger((!Versioned.IsNumeric(text2)) ? -1 : text2);
错误:
无法确定条件表达式的类型,因为'int'和'string'之间没有隐式转换
【问题讨论】:
标签: c#