En iyi yanıtlayıcılar
Goto hatası, bu hatayı nasıl aşabilirim?

Soru
-
private unsafe void timer4_Tick(object sender, EventArgs e) { void* ptr = stackalloc byte[31]; *(int*)ptr = Convert.ToInt32(label10.Text); *(int*)((byte*)ptr + 4) = Convert.ToInt32(label11.Text); DateTime dateTime = DateAndTime.TimeSerial(0, *(int*)ptr, *(int*)((byte*)ptr + 4)); string right = Strings.Format(dateTime, "mm:ss"); *(int*)((byte*)ptr + 8) = listBox1.Items.Count; *(int*)((byte*)ptr + 16) = 0; ((byte*)ptr)[24] = ((byte)((*(int*)ptr >= 25 | !timer2.Enabled) ? 1 : 0)); if (*(sbyte*)((byte*)ptr + 24) == 0) { *(int*)((byte*)ptr + 20) = *(int*)((byte*)ptr + 8); *(int*)((byte*)ptr + 12) = 0; while (*(int*)((byte*)ptr + 12) <= *(int*)((byte*)ptr + 20)) { ((byte*)ptr)[25] = ((byte)((*(int*)((byte*)ptr + 16) <= 50) ? 1 : 0)); if (*(sbyte*)((byte*)ptr + 25) != 0) { ((byte*)ptr)[26] = ((byte)(Operators.ConditionalCompareObjectGreaterEqual(listBox1.Items[*(int*)((byte*)ptr + 16)], right, false) ? 1 : 0)); if (*(sbyte*)((byte*)ptr + 26) != 0) { label13.Text = "00:" + listBox1.Items[*(int*)((byte*)ptr + 16)].ToString(); listBox1.SelectedIndex = *(int*)((byte*)ptr + 16); listBox2.SelectedIndex = *(int*)((byte*)ptr + 16); listBox3.SelectedIndex = *(int*)((byte*)ptr + 16); } else { *(int*)((byte*)ptr + 16) = checked(*(int*)(unchecked((byte*)ptr + 16)) + 1); } *(int*)((byte*)ptr + 12) = checked(*(int*)(unchecked((byte*)ptr + 12)) + 1); } else { timer4.Enabled = false; IL_193: DateTime dateTime2 = checked(Convert.ToDateTime(label13.Text).AddMinutes((double)(0 - dateTime.Minute)).AddSeconds((double)(0 - dateTime.Second))); label14.Text = string.Format("{0:mm}", dateTime2) + ":" + string.Format("{0:ss}", dateTime2); ((byte*)ptr)[27] = ((byte)((*(int*)((byte*)ptr + 16) <= 50) ? 1 : 0)); if (*(sbyte*)((byte*)ptr + 27) != 0) { label16.Text = Conversions.ToString(listBox2.Items[*(int*)((byte*)ptr + 16)]); label15.Text = Conversions.ToString(listBox3.Items[*(int*)((byte*)ptr + 16)]); label18.Text = Conversions.ToString(listBox4.Items[*(int*)((byte*)ptr + 16)]); } else { label16.Text = "SON"; label15.Text = "SON"; label18.Text = "SON"; } ((byte*)ptr)[28] = ((byte)((Conversions.ToDouble(string.Format("{0:ss}", dateTime2)) == Convert.ToDouble(numericUpDown5.Value) & Conversions.ToDouble(label12.Text) >= Convert.ToDouble(numericUpDown4.Value) & Operators.CompareString(label15.Text, "60", false) == 0) ? 1 : 0)); if (*(sbyte*)((byte*)ptr + 28) != 0) { label17.Text = "BAS"; return; } ((byte*)ptr)[29] = ((byte)((Conversions.ToDouble(string.Format("{0:ss}", dateTime2)) == Convert.ToDouble(numericUpDown5.Value) & Conversions.ToDouble(label12.Text) >= Convert.ToDouble(numericUpDown4.Value) & Operators.CompareString(label15.Text, "45", false) == 0) ? 1 : 0)); if (*(sbyte*)((byte*)ptr + 29) != 0) { label17.Text = "BAS"; return; } ((byte*)ptr)[30] = ((byte)((Conversions.ToDouble(string.Format("{0:ss}", dateTime2)) == Convert.ToDouble(numericUpDown7.Value) & Conversions.ToDouble(label12.Text) >= Convert.ToDouble(numericUpDown6.Value) & Operators.CompareString(label15.Text, "70", false) == 0) ? 1 : 0)); if (*(sbyte*)((byte*)ptr + 30) != 0) { label17.Text = "BAS"; return; } label17.Text = "MS"; return; } } goto IL_193; } timer4.Enabled = false; Interaction.MsgBox("Süre Listede yok veya Saat Çalişmiyor", MsgBoxStyle.OkOnly, null); }
Bu etikete başvurulmamış
Goto deyiminin kapsamında 'IL_193' etiketi yok
düzeltilmiş halini yazabilecek birisi var mı?
- Düzenleyen Maralx 7 Ağustos 2020 Cuma 04:45
Yanıtlar
-
Refract et, goto'yu kaldır.
timer4.Enabled = false; IL_193(ptr, dateTime); return; } } IL_193(ptr, dateTime); private unsafe void IL_193(void* ptr, DateTime dateTime) { ... }
dergikapaklari.com- Yanıt Olarak İşaretleyen Kyamuran SalibryamMicrosoft contingent staff, Moderator 13 Ağustos 2020 Perşembe 21:34
Tüm Yanıtlar
-
- Düzenleyen Cihan YakarMVP 6 Ağustos 2020 Perşembe 16:23
-
-
-
Refract et, goto'yu kaldır.
timer4.Enabled = false; IL_193(ptr, dateTime); return; } } IL_193(ptr, dateTime); private unsafe void IL_193(void* ptr, DateTime dateTime) { ... }
dergikapaklari.com- Yanıt Olarak İşaretleyen Kyamuran SalibryamMicrosoft contingent staff, Moderator 13 Ağustos 2020 Perşembe 21:34
-