Skip to content

Instantly share code, notes, and snippets.

Created April 21, 2017 08:11
Show Gist options
  • Save anonymous/681d831b6abab2bdb70132610d665a02 to your computer and use it in GitHub Desktop.
Save anonymous/681d831b6abab2bdb70132610d665a02 to your computer and use it in GitHub Desktop.
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 Exercise_O
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
HappyBirthday birthdayMessage;
birthdayMessage = new HappyBirthday();
MessageBox.Show( birthdayMessage.getMessage());
}
private void button2_Click(object sender, EventArgs e)
{
HappyBirthday birthdayMessage = new HappyBirthday();
string returnedMessage;
birthdayMessage.PresentCount = 5;
birthdayMessage.MyProperty = "Shahid";
returnedMessage = birthdayMessage.MyProperty;
MessageBox.Show(returnedMessage);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment