This program is show how to use check box in c#.net. According to this program if you tick the course (Check Box) and click the Tell Me Button it show check courses in bellow Label.
C#.net Code for Checkbox
Download Projectusing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace checkedbox
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void tellmeButton_Click(object sender, EventArgs e)
{
string result = "";
if (radcheckBox.Checked)
{
result += "\nRapid Application";
}
if (dbmscheckBox.Checked)
{
result += "\nData Base Management";
}
if (technocheckBox.Checked)
{
result += "\nTechnology Management";
}
if (pccheckBox.Checked)
{
result += "\nPC Application";
}
resultLabel.Text = "Your Cause is:." + result;
}
}
}

About the Author

0 comments: