Can we define a variable with the access modifier private
in an interface?
Answer Posted / rajat
No you cannot.
1. Because an interface cannot contain fields.
2. For methods also, you cannot give an access modifier
(public / private). By default, the methods will be public
Is This Answer Correct ? | 17 Yes | 0 No |
Post New Answer View All Answers
Is enum a value type c#?
What's the difference between class and object?
Which property of the textbox cannot be changed at runtime?
What is string programming language?
Why do we use virtual methods in c#?
What does .length do in c#?
What is the difference between int.parse and int.tryparse methods?
What is readline library?
What is the difference between CreateObject() and GetObject()?
What is the use of thread join in c#?
What is string interpolation in c#?
i want o/p 011242110 in c# code.
Explain the difference between “as” and “is” operators used in c#?
What is a copy constructor in c#?
What is private and shared assembly?