C# Programming - Interfaces - Discussion

Discussion Forum : Interfaces - General Questions (Q.No. 2)
2.
Which of the following can be declared in an interface?
  1. Properties
  2. Methods
  3. Enumerations
  4. Events
  5. Structures
1, 3
1, 2, 4
3, 5
4, 5
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
6 comments Page 1 of 1.

Prem said:   1 decade ago
Is this correct an interface can contain one or more methods and properties.

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.

Constantine said:   1 decade ago
Why it can't have enum and Structures?

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.

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.

Post your comments here:

Your comments will be displayed after verification.