Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using 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 Farmer
- {
- public partial class Form1 : Form
- {
- Farm farmer;
- public Form1()
- {
- InitializeComponent();
- farmer = new Farm() { NumberOfCows = 15 };
- }
- private void numericUpDown_ValueChanged(object sender, EventArgs e)
- {
- farmer.NumberOfCows = (int)numericUpDown.Value;
- }
- private void button_Calc_Click(object sender, EventArgs e)
- {
- String output = String.Format("I need {0} bags of feed für {1} cows", farmer.BagsOfFeed, farmer.NumberOfCows);
- MessageBox.Show(output);
- }
- private void button1_Click(object sender, EventArgs e)
- {
- public int BagsOfFeed { get; private set; }
- }
- }
- }
Add Comment
Please, Sign In to add comment