Hello eveybody , i am just new into the C# and VS , and my problem is with radiobutton,Here's the code.
i cannot use more than two button .

 private void button3_Click(object sender, EventArgs e)
        {
            string output;
            output = "["    + this.textBoxUID.Text + "]" ;
            output +=  this.textBoxCompany.Text;
            output += this.textBoxDate.Text;
            output +=  (string)(this.radioButtonby.Checked? "Low" : "Medium" : "High" )  ;  //<<<here
            this.textBoxOuput.Text = output;
        }

Radion button has two states. So you cannot have three option, and not if else statements (using ? : marks). Only two. So you can have:

string output;
output = "[" + this.textBoxUID.Text + "]" ;
output += this.textBoxCompany.Text;
output += this.textBoxDate.Text;
output += this.radioButtonby.Checked ? "Low" : "High"; //if is checked will be Low, ele High
this.textBoxOuput.Text = output;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.