Advertisement
AalborgHTX

Conditinal Operators

Jan 8th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 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 Operator
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void btnKnapSammenlign_Click(object sender, EventArgs e)
  21.         {
  22.             int tal1 = int.Parse(txtBoks1.Text);
  23.             int tal2 = int.Parse(txtBoks2.Text);
  24.  
  25.             if (tal1 ==1 || tal2 == 2)
  26.             {
  27.                 MessageBox.Show("JA");
  28.             }
  29.             else
  30.                 MessageBox.Show("NEJ");
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement