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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Abhineet SrivastavaRank #1,890 · 783 reputationPosted Aug 24, 2013, 2:18 AM EDT
VulpesRank #55 · 29.2K reputationPosted Aug 24, 2013, 2:28 AM EDT
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 SrivastavaRank #1,890 · 783 reputationPosted Aug 24, 2013, 2:31 AM EDT
One confusion--
What will the use of Interface with Private access modifier?
Cheers
Abhineet SrivastavaRank #1,890 · 783 reputationPosted Aug 24, 2013, 2:35 AM EDT
Cheers
VulpesRank #55 · 29.2K reputationPosted Aug 24, 2013, 2:51 AM EDT
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 SrivastavaRank #1,890 · 783 reputationPosted Aug 24, 2013, 3:21 AM EDT
Thanks