C# Programming - Interfaces - Discussion

Discussion Forum : Interfaces - General Questions (Q.No. 5)
5.
Which of the following statements is correct about Interfaces used in C#.NET?
All interfaces are derived from an Object class.
Interfaces can be inherited.
All interfaces are derived from an Object interface.
Interfaces can contain only method declaration.
Interfaces can contain static data and methods.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
7 comments Page 1 of 1.

Mukesh Nigam said:   10 years ago
Interface is never inherited, its always implemented in its derived type. Inheritance model is not followed by an interface.

Tripti said:   1 decade ago
Please explain the answer.

Vikas Kumar said:   1 decade ago
// We know that interface cannot be derived from object but,

interface xyz
{
}

public class Demo
{
public void main()
{
xyz x;
x.ToString();

// From where we get this method.

}
}

Chenchaiah mallu said:   1 decade ago
Interface is not possible to direct instance.

Lalit said:   1 decade ago
Why not A? all types are inherited from System.Object right?

Naveen Kumar Awasthi said:   1 decade ago
What it mean interface inherit from Class of another Interface?

Vidya said:   1 decade ago
What is the need of interface?

Post your comments here:

Your comments will be displayed after verification.