Комментарии:
Best teacher, what I am today is due to your helpful materials. There was a time when I got my degree I tried a lot to get easy materials to help me in getting a job but remained jobless for a long time. But I continued struggling for getting a job, one day I got these tutorials and soon after 2 weeks I got a job. Thanks a lot sir venkat, you are really a professional teacher.
ОтветитьInterface class only contains non-implemented methods while an abstract class can have field members, implemented methods, and non-implemented methods. Interface class is a contract where the inheriter agrees to implement the methods and an abstract class is an incomplete class that can't be created and only inherited from.
ОтветитьNow after c# 8, even interface can have method implimentation.
ОтветитьBut sir.. Interface can have access modifiers and can have implementation as well.
Below code worked.
interface Itest1
{
public void iprintf1()//explicit access modifier
{
Console.WriteLine("Hello World in interface 1");
}
}
class clsNew : Itest1
{
}
class Program
{
static void Main(string[] args)
{
Itest1 oItest1 = new clsNew();
oItest1.iprintf1();
}
}
Hi Venkat! I know it's been long since you've made this video, but I'm commenting this now: Please rectify if I'm wrong. I think in current version of dotnet(6), we can also create complete method definition inside an interface, which eliminates this key difference between an abstract class and interface.
Even we can add "public" before a method definition in an interface and the compiler won't throw an error at compile-time
Good video thanks, just so quiet....
Ответить14 april 2021
ОтветитьHe should arrange a meetup. we want to meet him. Hes is so crisp and clear , he even corrects his grammar.
ОтветитьHi,
If anyone needs guidance to crack interviews of Dot Net to get massive hike, please contact on 7448009456.
This is for serious candidates with having experience atleast 2 years
Regards
But now in C# 8.0 we have interface having implementation for its members. And many more additional features.
Ответитьyou are a LEGEND.
Ответитьplease english subtitles....
ОтветитьInterfaces can have properties though. You should mention that
ОтветитьGood job in explaining the concept
Ответитьsorry , but on c # v 8 Interfaces Can Have Implementation
ОтветитьSo an Interface can only have a method's declaration and name but no function or data.
And an abstract class cannot be inherited or gotten multiple times by the same class, but an abstract class CAN inherit from another abstract class.
Thus to combine multiple abstract classes you simply make them inherit each other, thus the final class gets the functionality of all the abstract classes.
When to use Abstract Class and When to use Interface ?
ОтветитьCan anyone tell me why Interfaces and where we using it in real time?
ОтветитьCan u explain the third point in detail ...
ОтветитьHi Venkat,
I have been asked so many times a question in Interview that-
In which case we should go for abstract classes and Interfaces?
Please help me.
Really helpful.Great work
ОтветитьSir plz explain encapsulation vs abstraction with example, Having seen so many videos I got confused.
ОтветитьAnd the constructor :D
Ответитьthank u
ОтветитьHello Sir Thank you for explaining so good.
You didn't tell about usage of abstract or interfaces in real time project.
why wo we use it.
Thanks buddy, your all video very useful for all developer.
ОтветитьInterface only inherited by interface? Then where will be the implementation of interface members?
ОтветитьI believe, unlike in C#, in Java, an interface can have field. Right?
ОтветитьThis is such a great teacher and brilliant series. I have learnt so much from your videos! Thank you so much.
ОтветитьThank you that helps me alot to understand what is the difference between Abstract and interface.
ОтветитьHow can an abstract class inherit from another class or interface when it is always a base class
Ответитьwhy would u have a method that is not abstract in an abstract class ?
Ответитьyou are the best
ОтветитьYou're The Man!
ОтветитьCan anybody please tell,,,,, Abstract class can have implementation for some of it's method.. May i know in which case it will not have implementation for any of it's method....
Ответить(1)Use an interface to design a polymorphic hierarchy for value types.
(2)Use an interface when an immutable contract is really intended.
(3)A well-designed interface defines a very specific range of functionality. Split up interfaces that contain unrelated functionality.
(4)Use interfaces to introduce polymorphic behavior without subclassing and to model multiple inheritance—allowing a specific type to support numerous behaviors.
I dosent understand that above lines.
can you please try explaain me in better way??
with example?
Thnak's
Thank you Sİr
ОтветитьThank you Sir
Ответитьsir , an interface can inherited by non abstract class
ОтветитьVenkat, you said Abstract class acts as a base class!!! Then How this point from your slide is possible...?
ABSTRACT CLASS CAN INHERIT FROM ANOTHER ABSTRACT CLASS OR ANOTHER INTERFACE.... My Doubt was, how can any class can be a Base class when it is inheriting from another Abstract class or interface??? Can you please let me know
Hello venkat,
Can you please explain any real world example of when and where to use interface and abstract class. Also can you please explain dependancy injection.
Thanks
really really ur teaching is very helpful thanks so much
ОтветитьPlease upload a video on sql execution plan.
ОтветитьKeep in mind that since Java 8 you can implement interface methods with the 'default' keyword
Ответить"abstract method Must be implemented" is the case when an abstracted is inherited. Is it the same when an interface is inherited and "all the methods should be implemented"? Is it mandatory to implement all the methods of interface as that of abstract class? Thankyou
Ответитьwow what great video :-)
Ответить