I\'ve struck upon something I don\'t really understand.
I have a project, where I have an interface that is internal. The class that implements that interface is als
If your intention is to hide a certain implementation from outside, you can implement it explicitly like this:
internal class LDialogService : ILDialogService, ILDialogInternalService
{
public async Task ShowAsync(ILDialogFragment fragment)
{
throw new NotImplementedException();
}
void ILDialogInternalService.SetComponent(LDialog component)
{
throw new NotImplementedException();
}
}
In the above code, I want to expose ShowAsync
method to the outside but keep SetComponent
inside. Since ILDialogInternalService
is internal
, no one can call it from outside except through Reflection.