Friday, 23 December 2016

InterfaceTest

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OopsConcept
{
    class InterfaceTest
    {
        interface myclass
        {
            string Animal();
            string Animal1();
  
            // {
            //     string stranimaltext ="Dog has four leg";
            //     return stranimaltext;

            // }
            //public static void Refrencefunction()
            //{
            //}

        }
        class Aceeessabstract : myclass
        {
            public string Animal()
            {
                string stranimaltext = "Cow has four leg";
                return stranimaltext;

            }
            public string Animal1()
            {
                string stranimaltext = "Buffalow1 has four leg";
                return stranimaltext;

            }

        }


        static void Main2(string[] args)
        {
            Aceeessabstract objAb = new Aceeessabstract();
            Console.WriteLine(objAb.Animal());
            Console.WriteLine(objAb.Animal1());
            Console.Read();
        }
    }
}

No comments:

Post a Comment