public interface Class1
{
public void LoadData();
void UpdateData();
void IntializeData();
string Make { get; set; }
}
I want to know the reason please any one can help.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abhineet SrivastavaPosted Aug 24, 2013, 7:21 AM
Thanks
VulpesPosted Aug 24, 2013, 6:51 AM
You'd only use these in practice when you have a complex system of nested classes and you want some of them to implement the interface:
Abhineet SrivastavaPosted Aug 24, 2013, 6:35 AM
Cheers
Abhineet SrivastavaPosted Aug 24, 2013, 6:31 AM
One confusion--
What will the use of Interface with Private access modifier?
Cheers
VulpesPosted Aug 24, 2013, 6:28 AM
Rather than insist on adding the public access modifier to every member, the C# design team evidently felt - in the interests of brevity - that it was better not to allow any access modifiers at all.
Note though that the interface itself can have any of the access modifiers : public, internal, protected, protected internal or private. If no access modifier is specified, a 'top level 'interface is internal and a 'nested' interface is private by default.
Abhineet SrivastavaPosted Aug 24, 2013, 6:18 AM