Ankit Kumar

Ankit Kumar

  • NA
  • 159
  • 48.6k

Problem with Inheritance in c#

Feb 25 2016 4:21 AM
Dear all,
 
i have a confusion with interface.
 
i have created a method in interface and trying to give implementation in the derived class.
 
i am trying to declare the method with access specifiers but with access specifiers, i am getting an error.
 
Please help me. 
 
below is my code.
 
using System;
public interface Windows
{
private void Configuration();
}
class Windows_7:Windows
{
public void Configuration()
{
Console.WriteLine("this O.S. is protected by microsoft security team");
Console.WriteLine("This is 32 bit O.S.");
}
}
class Program
{
public static void Main(string[]args)
{Windows_7 obj = new Windows_7();
obj.Configuration();
obj.Test();
Console.ReadLine();
}
}
 

Answers (8)