Why can?t you specify the accessibility modifier for
methods inside the interface?
Answer Posted / hafiz usman majeed
as by default public access is provided in c-sharp.net
classes and interfaces, and we use interfaces for
accompolishing the purpose of multiple inheritence we must
redefine all of the methods of interface in its inherited
class that implements it so all of these methods should be
publically accessible.
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What does the keyword “virtual†declare for a method or property?
Is c sharp open source?
What is join in c#?
In a memory when you Box and Unbox a value-type what happens?
What is Custom attribute? How to create? If I'm having custom attribute in an assembly, how to say that name in the code?
Why is dll used?
How to sort an int array in c#?
Why do we need to serialize data?
What is writeline in c#?
What is the difference between int16 and int32 in c#?
Why do we need delegates in c#?
What method is used to sort the elements of the array in descending order?
How to use the sreamReader class to read form a text file?
Can the nested class access, the containing class. Give an example?
Will the following code compile?