Beispiel #1
0
        static void Main(string[] args)
        {
			// Create two instances of DaysTemp
			DaysTemp t1 = new DaysTemp();
			DaysTemp t2 = new DaysTemp();
			
			// Write to the fields of each instance
			t1.High = 76;
			t1.Low = 57;
			
			t2.High = 75;
			t2.Low = 53;
			
			// Read from the fields from each instance
			// Call the method of each instance
			Console.WriteLine("t1:	{0},	{1},	{2}", t1.High, t1.Low, t1.Average());
			Console.WriteLine("t2:	{0},	{1},	{2}", t2.High, t2.Low, t2.Average());
		}
Beispiel #2
0
        static void Main(string[] args)
        {
			DaysTemp dt = new DaysTemp();
			float avg = dt.Average();
			Console.WriteLine(avg);
		}