I came across this problem when i was implementing n interface explicitly using Visual Studio. So the interface contains properties, but when I am implementing the property explicitly in an abstract class, Compiler throws error "The modifier 'public' is not valid for this item".
Refer Below given code.
interface ITest
{
bool MyProperty { get; set; }
}
internal class Test : ITest
{
public bool ITest.MyProperty
{
get
{
return false;
}
set { }
}
}