Why can?t you specify the accessibility modifier for
methods inside the interface?

Answer Posted / kishore anumala

Always the access specifiers for the method in an interface
is public. We cannot implement the methods of interface if
the access specifier is other than public as we will be
left with errors like "members cannot access due to
protection level".

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is lazy keyword in c#?

524


Write a C# program to find the Factorial of n

554


what is IFormatable

576


What are the differences between system.string and system.text.stringbuilder classes?

478


What is sqlconnection in c#?

486






Is array ienumerable c#?

467


If casting fails what type of exception is thrown?

476


Which config file has all the supported channels/protocol?

544


What is indexer c#?

463


What is the advantage of dependency injection?

494


Does c# support const methods, properties, or events?

540


How big is int16?

516


What are collection classes?

465


Is string a primitive data type in c#?

500


What is difference between tostring() vs convert.tostring() vs (string) cast

537