Part 11 .Net c# OOPS Questions on Multiple inheritance, Explicit & Implicit Interface implementation

preview_player
Показать описание
How to achieve multiple inheritance through interface?

If 2 interface has same method then how to implement the method?

What is implicit implementation and when to use in interface?
What is explicit implementation and when to use?

Is it compulsory to implement all methods of interface?
Рекомендации по теме
Комментарии
Автор

Can you take class about access specifier and access modifiers in c#. Net

priyaprabhakaran
Автор

Can you add question on delegate and multithreading

snehalfarfade
Автор

While your typing it doesn't sound good so please keep the mic away .it hurts to ears.thank you

nishikantrewatkar
Автор

For Question: 48. We have two choices
1. As you said in video, We have to implement all the methods required by interface.
2. Mark method as Abstract in abstract class inheriting the interface. Later subclass which inherits from this abstract class can implement abstract method.

Below is the Sample code snippet...

interface ITest
{
string GetName();
DateTime GetCurrentDate();
}
abstract class Test : ITest
{
public abstract DateTime GetCurrentDate();
public string GetName()
{
throw new NotImplementedException();
}
}

siddeshkc
join shbcf.ru