using System;
namespace practice
{
interface IEmployee
{
void empdisplaydetails();
}
interface IManager : IEmployee
{
void Managerdetails();
}
class Departmentdetails : IManager
{
void IEmployee.empdisplaydetails()
{
Console.WriteLine("Employee Details");
}
void IManager.Managerdetails()
{
Console.WriteLine("Manager is working in sales department");
}
}
class Program
{
public static void Main(string[] args)
{
Departmentdetails d = new Departmentdetails();
IEmployee emp = d;
emp.empdisplaydetails();
IManager mg = d;
mg.Managerdetails();
}
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter