Guest User

Untitled

a guest
Jan 24th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.88 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.Windows.Forms;
  9.  
  10. namespace test2
  11. {
  12.     public partial class Form1 : Form
  13.     {
  14.         public Form1()
  15.         {
  16.             InitializeComponent();
  17.         }
  18.  
  19.         private void button1_Click(object sender, EventArgs e)
  20.         {
  21.             // textBox1.Text = Convert.ToString(calculate(1, 1));
  22.  
  23.         }
  24.  
  25.         private int calculate(int varOne, int varTwo)
  26.         {
  27.             int varThree;
  28.             varThree = varOne + varTwo;
  29.             return varThree;
  30.         }
  31.  
  32.         private void alert(string text)
  33.         {
  34.             MessageBox.Show(text);
  35.         }
  36.  
  37.         private void button2_Click(object sender, EventArgs e)
  38.         {
  39.             alert("Pling!");
  40.         }
  41.     }
  42. }
Add Comment
Please, Sign In to add comment