TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Hassaan Qureshi
NA
1
1k
or "||" operator problems ?
Jan 17 2015 3:37 AM
private void button1_Click(object sender, EventArgs e)
{
if (radioButton1.Checked || radioButton2.Checked || radioButton3.Checked)
{
int tp=0;
if (j == "No")
{
if (radioButton1.Checked)
{
tp = obje.get_economyprice();
}
if (radioButton2.Checked)
{
tp = obje.get_firstprice();
}
if (radioButton3.Checked)
{
tp = obje.get_businessprice();
}
}
else if (j == "Yes")
{
normal_price obj = new employee_price();
if (radioButton1.Checked)
{
tp = obj.get_economyprice();
}
if (radioButton2.Checked)
{
tp = obj.get_firstprice();
}
if (radioButton3.Checked)
{
tp = obj.get_businessprice();
}
}
Form3 objd = new Form3(tp, m, l);
objd.Show();
this.Hide();
}
else if (!radioButton3.Checked && !radioButton2.Checked && !radioButton1.Checked)
{
MessageBox.Show("Please select any class");
}
}
}
i have these if statements in my button1click event when ever i debug and one of the radiobutton is checked even then it shows messagebox with error ?
please help
Reply
Answers (
1
)
Method Hiding in c#
how to generate a guid