Professional Documents
Culture Documents
Interface Example
Interface Example
namespace Capgemini.CSharp.Day6
{
public interface IBuildingContractor
{
void GetMasion();
void GetElectrician();
void GetPlumber();
}
---OwnBuilding.cs
using System;
namespace Capgemini.CSharp.Day6
{
public class MyOwnBuilding : IBuildingContractorAdvanced, IBuildingContractor,
IContractName // Multiple Implementation
{
public string ContractorName { get => throw new NotImplementedException();
set => throw new NotImplementedException(); }
---GovtBuilding.cs
using System;
namespace Capgemini.CSharp.Day6
{
class GovtBuilding : IBuildingContractor, IContractName
{
public string ContractorName { get; set; }
---ExistingHouse.cs
using System;
namespace Capgemini.CSharp.Day6
{
class ExistingBuilding : IBuildingContractorAdvanced, IContractName //Multiple
Implementation
{
public string ContractorName { get => throw new NotImplementedException();
set => throw new NotImplementedException(); }