C# Programming - Interfaces - Discussion
Discussion Forum : Interfaces - General Questions (Q.No. 2)
2.
Which of the following can be declared in an interface?
- Properties
- Methods
- Enumerations
- Events
- Structures
Discussion:
6 comments Page 1 of 1.
Samir Sayyad said:
1 decade ago
An interface can contain one or more methods,properties,indexers and events but none of them are implemented in the interface itself.
Samir Sayyad said:
1 decade ago
An interface can contain one or more methods, properties, indexers and events but none of them are implemented in the interface itself.
Anupam said:
1 decade ago
An interface can contain one or more methods, properties, indexers and events but none of them are implemented in the interface itself.
Constantine said:
1 decade ago
Why it can't have enum and Structures?
Mohammad Amir Suhel said:
1 decade ago
1) Enum is variable not the type, so you can not put the enum in interface.
2) Interface is kind of contract.
2) Interface is kind of contract.
Prem said:
1 decade ago
Is this correct an interface can contain one or more methods and properties.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers