- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is explicit implementation and when to use in the interface in C#?
If a class implements two interfaces that contain a member with the same signature, then implementing that member on the class will cause both interfaces to use that member as their implementation.
It's possible to implement an interface member explicitly—creating a class member that is only called through the interface, and is specific to that interface
Example
interface ICar{ void display(); } interface IBike{ void display(); } class ShowRoom : ICar, IBike{ void ICar.display(){ throw new NotImplementedException(); } void IBike.display(){ throw new NotImplementedException(); } } class Program{ static void Main(){ Console.ReadKey(); } }
- Related Articles
- What is the implicit implementation of the interface and when to use implicit implementation of the interface in C#?
- When to use an abstract class and when to use an interface in Java?
- Use of explicit keyword in C++\n
- What is the difference between implicit and explicit type conversion in C#?
- When to use inline function and when not to use it in C/C++?
- What does the explicit keyword mean in C++?
- Checking implementation of interface IF_EX_IDOC_CREATION_CHECK in SAP ABAP
- What are explicit type conversions in C#?
- What are implicit and explicit type conversions in C language?
- What is an interface in C#?
- What is the explicit wait in Selenium with python?
- What is Interface segregation principle and how to implement it in C#?
- What is a smart pointer and when should I use it in C++?
- What is the user interface and operating system interface?
- What is the difference between an interface and a class in C#?

Advertisements