C# Internal Interface
you can not declare Encapsulation in the Interface like Public
Example for Internal Interface.
Here , One class and Two Interface in the coding.
Class Name:MyClass
Interface Names :IMyPublicInterface,IMyInternalInterface
Create Normal interface
you can not declare Encapsulation in the Interface like Public
Example for Internal Interface.
Here , One class and Two Interface in the coding.
Class Name:MyClass
Interface Names :IMyPublicInterface,IMyInternalInterface
Create Normal interface
public interface IMyPublicInterface
{
void MyPublicMethod();
}
Create Internal interface{
void MyPublicMethod();
}
internal interface IMyInternalInterface
{
void MyInternalMethod();
}
Inherited two interface into One class using Colon(:){
void MyInternalMethod();
}
public class MyClass :
IMyPublicInterface, IMyInternalInterface
{
/// Called interface methods in the Class
public void MyPublicMethod() { }
void IMyInternalInterface.MyInternalMethod() { }
}
IMyPublicInterface, IMyInternalInterface
{
/// Called interface methods in the Class
public void MyPublicMethod() { }
void IMyInternalInterface.MyInternalMethod() { }
}