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
v blackcaps
NA
27
3.4k
how to validate 2 textboxes it accept only numbers?
Jan 16 2020 3:46 PM
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace calculator
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
// a simple calculator design two textbox and 4 radio buttons result will be in the textbox3.
double num1 = double.Parse(textBox1.Text);
double num2 = double.Parse(textBox2.Text);
double result=0;
if (radioButton1.Checked == true)
{
result = num1 + num2;
}
else if (radioButton2.Checked == true)
{
result = num1 - num2;
}
else if (radioButton3.Checked == true)
{
result = num1 * num2;
}
else if (radioButton4.Checked == true)
{
result = num1 / num2;
}
textBox3.Text = result.ToString();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void panel2_Paint(object sender, PaintEventArgs e)
{
}
}
}
sir validation is important or not i dont know plz guide me.
wds
Blackcaps.
Reply
Answers (
2
)
How can be store bounce mail in db in .net core 3.1
SPFX webpart not showing in SharePoint site Apps list