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
Why do we use static methods in c#?
What does .length do in c#?
How many types of constructors are available in c#?
how to create crystal reports give one detail example(i want to view age category report) please give suitable example in my small knowledge
Where do we use serialization in c#?
What is event and delegates in c#?
How can I get around scope problems in a try/catch?
What is the difference between system.text.stringbuilder and system.string?
If I have more than one version of one assemblies, then how'll I use old version (how/where to specify version number?)in my application?
How do you prevent a class from being inherited?
What is the function of .IsDescendent()?
Give some examples of commonly used i/o classes?
What is null in database?
Explain how do I convert a string to an int in c#?
Can namespace contain the private class?