Пример #1
0
        static void Main()
        {
            Derived obj = new Derived();

            Console.WriteLine(obj.Add(10, 20));
            Console.WriteLine(obj.Add(10, 12.5f));
            Console.WriteLine(obj.Add(10, 20, 30));
            Console.WriteLine(obj.Add(13.5f, 10));
            Console.Read();
        }
Пример #2
0
	public static int Main ()
	{
		Derived d = new Derived ();

		d.Add (1);
		if (d.val == 1)
			return 1;

		if (d.val == 2)
			return 0;
		return 2;

	}
Пример #3
0
    static int Main()
    {
        Derived d = new Derived();

        d.Add(1);
        if (d.val == 1)
        {
            return(1);
        }

        if (d.val == 2)
        {
            return(0);
        }
        return(2);
    }