如何修復錯誤?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