如何修复错误?goto声明范围内没有此类标签'Label_05C0'
错误23 goto语句H的范围内没有这样的标签 'Label_05C0':\ calismalarim \ V2 \ 2个\ ro.ascx.cs 582 17 2版
if (this.PriceID == "")
{
this.ddlSelectedPrices.Visible = false;
this.lnkClosePrices.Visible = false;
this.lblClosePrices.Visible = false;
DataTable table2 = new DataTable();
table2.Columns.Add("PriceID", Type.GetType("System.Int32"));
table2.Columns.Add("PriceName", Type.GetType("System.String"));
table2.Columns.Add("Count", Type.GetType("System.Int32"));
int num3 = 1;
while (str != "")
{
ds.Tables[0].DefaultView.RowFilter = str + " and " + this.method_6(Conversions.ToString(num3));
Label_0547:
if (ds.Tables[0].DefaultView.Count > 0)
{
table2.Rows.Add(new object[] { num3, this.method_5(Conversions.ToString(num3)), ds.Tables[0].DefaultView.Count });
}
num3++;
if (num3 <= 12)
{
continue;
}
this.dlPrices.DataSource = table2;
this.dlPrices.DataBind();
if (this.dlPrices.Items.Count > 0)
{
this.divPrices.Visible = true;
this.dlPrices.Visible = true;
this.lblPrices.Visible = true;
}
return;
Label_05C0:
ds.Tables[0].DefaultView.RowFilter = this.method_6(Conversions.ToString(num3));
goto Label_0547;
int zz21z1a = 0;
}
goto Label_05C0;
int zzz1f = 0;
}
我的建议:重构并摆脱你的goto! – 2013-02-14 22:13:57
自从我见过一个这么久以来,我忘记了他们做了什么! – 2013-02-14 22:32:51
前往!一段时间以来我见过的最糟糕的代码。匈牙利符号嘉豪,'goto',魔法值,过度使用'this',很有可能重新改造车轮'Conversions.ToString(int)'......啊......看着它的幸福! – 2013-02-14 22:33:18