0

Guys this is a visual C# code but can anyone tell me what's wrong with it?

using System; using System.Windows.Forms; namespace WindowsFormsApplication2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { bool A = radioButton1.Checked; bool B = radioButton2.Checked; bool C = radioButton3.Checked; String X = label1.Text; if (A == true) X = "330

quot;; else if (B == true) X = "400
quot;; else (C == true) X = "500
quot;; } } }

16th Nov 2017, 1:24 PM
Bahaa Elboraey
Bahaa Elboraey - avatar
2 Réponses
+ 2
remove the (C==true) after the last else ,or change it to else if (C==true)
16th Nov 2017, 2:08 PM
Loai Hazima
Loai Hazima - avatar
+ 1
I am not sure the C# compiler used by this app recognises GUI elements.
16th Nov 2017, 1:51 PM
josh mizzi
josh mizzi - avatar