In this program expected output is as follows:My flavor - Vanilla
My flavor - Chocolate
But program gives following output:This is not my flavor
My flavor - Vanilla
This is not my flavor
Please explain.
using System;
public
{
MyFlavor i1 =
MyFlavor i2 =
Console.WriteLine("My flavor - {0}", i1.GetFlavor());
Console.WriteLine("My flavor - {0}", i2.GetFlavor());
}
class
MyFlavorException me =
Console.WriteLine(e.Message);