private void usingNectar_Click(object sender, RoutedEventArgs e)
        {
            BeeHive hive = new BeeHive();

            using (Stream hiveLog = File.Create("hiveLog.txt"))
            using (Nectar nectar = new Nectar(20, hive, hiveLog))
            {
                MessageBox.Show("Using Stream and Nectar objects.");
            }
        }
Example #2
0
 public Nectar(double amount, BeeHive hive, Stream hiveLog)
 {
     this.amount = amount;
     this.hive = hive;
     this.hiveLog = hiveLog;
 }