Advertisement
mess0011

ue6_1

May 10th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace WindowsFormsApplication2
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void button1_Click(object sender, EventArgs e)
  21.         {
  22.             if (radioButton1.Checked)
  23.             {
  24.                 textBox1.Text = radioButton1.Text;
  25.             }
  26.             else if (radioButton2.Checked)
  27.             {
  28.                 textBox1.Text = radioButton2.Text;
  29.             }
  30.             else if (radioButton3.Checked)
  31.             {
  32.                 textBox1.Text = radioButton3.Text;
  33.             }
  34.             else
  35.             {
  36.                 textBox1.Text = "Chose an option";
  37.             }
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement