using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/// <summary>
/// Developer : Belbinson Toby
/// </summary>
namespace Class
{
public interface IEmployee
{
void Result();
}
public interface IDeveloper
{
void Result();
}
public class Employee
{
public void Result()
{
Console.WriteLine("Employee");
}
}
public class Developer : Employee, IEmployee, IDeveloper
{
void IEmployee.Result()
{
Console.WriteLine("IEmployee");
}
void IDeveloper.Result()
{
Console.WriteLine("IDeveloper");
}
public new void Result()
{
Console.WriteLine("Developer");
}
}
public class Program
{
static void Main(string[] args)
{
Developer objDeveloper = new Developer();
objDeveloper.Result();// This will call Result Method in Developer Class
Employee objEmployee = new Developer();
objEmployee.Result();// This will call Result Method in Employee Class
IEmployee objIe = new Developer();
objIe.Result();// This will call Result Method in IEmployee Class
IDeveloper objId = new Developer();
objId.Result();// // This will call Result Method in IDeveloper Class
Console.ReadLine();
}
}
}
Subscribe to:
Post Comments (Atom)
0 Response to "Some Interesting Codes"
Post a Comment