What is the real use of interface in c#?



What is the real use of interface in c#?..

Answer / Indira Kumari

Interfaces in C# are primarily used to define a contract or set of methods that must be implemented by classes that want to adhere to that contract. They enable loose coupling, making it easier to swap implementations and promoting testability.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

List some of the common data providers for ado.net framework?

1 Answers  


what is the purpose of Interfaces?

7 Answers   HCL,


What is primitive types in c#?

1 Answers  


What is the difference between c and c sharp?

1 Answers  


What is default c#?

1 Answers  


What is delegates in c#?

1 Answers  


What is the delegates in c#?

1 Answers  


Tell us something about static linking and dynamic linking?

1 Answers   C DAC,


Which property do we set on a Combo Box to display data on it prior to setting the DataSource ?

1 Answers   Siebel,


int i = 1; int j = 1; System.Console.WriteLine(i == j); System.Console.WriteLine(i.ToString() == j.ToString()); System.Console.WriteLine((object)i == (object)j); Give the sample code above, what is the output to the console?

5 Answers  


Define mutex in C#?

1 Answers  


What is static void main in c#?

1 Answers  


Categories