what is the purpose of interface in c#.net

Answer Posted / mayur teli

Basic purpose is to use the defined structure/pattern of common implementation on the child location.
In other word we can say that when multiple people are working on same project if they need to use some common functionality (like initializing variables for their module) instead of writing their own method name(like init(), initialize(), setup()) if we write single method name (lets say init) then this method name can be implemented by any developer who derived....
and use to achieve multiple inheritance.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between // comments, /* */ comments and /// comments?

489


What are methods in C#?

558


What are extension methods and where can we use them?

451


How is the syntax written to inherit from a class in C#?Give an example ?

531


Why do we need serialization?

430






What is null in database?

460


What is difference between Trace and Debug

541


Is Multiple-inheritance supported by c#?

573


What is difference between yielding and sleeping?

448


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

532


What is binary search tree in data structure?

471


What is native image generator (ngen.exe)?

624


Explain metadata in c#.

488


Explain the difference between user control and custom control. Also, explain their use.

584


What is data type in c# with example?

513