© 2014 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu
Quick Links
Easy Studies

  HomeSource Code DotNet ► C# ▼

Single Interface

All interfaces should be declared with the keyword interface. You can implement any number of interfaces in a single derived class, but you should provide signatures to all method definitions of the corresponding interfaces.

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        interface inter
        {
            void show();
        }
        class interimp : inter
        {
            public void show()
            {
                System.Console.WriteLine("show() method implemented");
                System.Console.Read();
            }
            static void Main(string[] args)
            {
                interimp interp = new interimp();
                interp.show();
            }
        }
    }
}

SLogix Student Projects
bottom