Interface in C#

  Рет қаралды 163,266

.NET Interview Preparation videos

.NET Interview Preparation videos

Күн бұрын

Пікірлер: 174
@dnfvideo
@dnfvideo 3 жыл бұрын
30 Important C# Interview Questions : kzbin.info/www/bejne/eHzcn3h4hdacf68 25 Important ASP.NET Interview Questions : kzbin.info/www/bejne/ponQfpejf7p2Zsk 25 Angular Interview Questions : kzbin.info/www/bejne/Y5vIoKx6f6mmia8 20+ SQL Server Interview Questions : kzbin.info/www/bejne/iXbHcnluorh-iZY 5 MSBI Interview Questions : kzbin.info/www/bejne/a3abYmiXjaaqj7M
@adityaghosalkar431
@adityaghosalkar431 6 жыл бұрын
One of the best explanation I have ever seen about Interfaces Thank You so much
@pickle1987
@pickle1987 6 жыл бұрын
From my point of view, Interfaces are used mainly to implement Polymorhpisme, they are very useful to decouple your code base (if you are using an IoC framework) by injecting the interface representing your concrete Presenter/Service or whatever you want, and lastly if you write unit tests with Microsoft Fakes you will need them to generate your stubs
@dnfvideo
@dnfvideo 6 жыл бұрын
Polymorphism exists because of parent child relationship. With out inheritance there is no polymorphism.I an create a parent simple base class and still do DI for child classes. Decoupling is a product of polymorphism. Polymorphism gives the ability to run objects differently under different conditions and thus hiding the concreteness. With simple base class i can still do plymorphism and DI.I do agree interfaces gives you a very generic structure as compared to simple class where you will have some base implementation. SimpleClass x = new SimpleChildClass1(); x.Method1(); x = new SimpleChildClass2(); x.Method1();
@markanthonysabado9632
@markanthonysabado9632 4 жыл бұрын
Real world scenario we use Interface because of polymorphism and swappable component.
@jonathansaindon788
@jonathansaindon788 Жыл бұрын
@@dnfvideo parent child relationship has more to do with inheritance than polymorphism. Interfaces are the simplest and cleanest way of achieving polymorphism.
@Imrankhan-nn5kp
@Imrankhan-nn5kp 5 жыл бұрын
The Best video over the internet on interface. Thank you so much . It helped a lot.. keep going brother.
@swingymcswing
@swingymcswing 5 жыл бұрын
Now that I've heard this, I feel like I understand more than before. Didn't really realize there were implicit contracts and that multiple interfaces can happen after app is in production to add new features and not break existing interfaces. Very nice explanation.
@sanyogitapatil164
@sanyogitapatil164 Жыл бұрын
Please provide boilerplate documents lecture please sir I will need
@AmitKumar-mt9mf
@AmitKumar-mt9mf 5 жыл бұрын
One of the best explanation of Interface over the internet. Thanks you so much for creating this video.
@rohityadav5802
@rohityadav5802 3 жыл бұрын
The First Time I could understand the actual use of the interface, Excellent explanation thank you very much for this video.
@manishjawarkar84
@manishjawarkar84 5 жыл бұрын
Best explanation for Interface and Clear all my doubts. Thank you so much.
@balamurugankalyanasundaram426
@balamurugankalyanasundaram426 5 жыл бұрын
Nice article about the interfaces. I have few questions. 1.Instead of Factory pattern, we can choose any other patterns like abstract factory or resolver or DI? 2.Will abstract class solve the same problem discussed here? if it so, what are the other advantages to prefer interfaces? 3.Can we use abstract classes for dependency injection?
@achilleskocaeli
@achilleskocaeli 4 жыл бұрын
Respect. After that video, I learnt interfaces. I am now immortal.
@hakrman2954
@hakrman2954 4 жыл бұрын
no u r not
@selvaa5876
@selvaa5876 5 жыл бұрын
Really very good explanation about Interface. great session. Thank you so much !!!
@MichaelRainabbaRichardson
@MichaelRainabbaRichardson 5 жыл бұрын
Great video as others have said! I needed it as a bit of a refresher and at the end I wonder if others might appreciate another perspective on interfaces. I look at the interface as a declaration of what my class should be while the class is the implementation of that design. Contract is incredibly appropriate when looking at it from the perspective of consumption, but if you are developing from a purely OOP perspective, interfaces represent the abstract of how an object should present itself ("what") while the class describes the actual solution ("how"). In these examples, the interfaces were extracted from the class, but from a design perspective, you would logically define your entities, then build your interfaces to start solidifying the design, then you would begin to build your classes using those interfaces as schema/blueprint/outline to create actual behaviors.
@sanketnaik2825
@sanketnaik2825 6 жыл бұрын
Hi sir, Can you please make a practical video on SOLID properties....
@FeroChau
@FeroChau 6 жыл бұрын
In my perspective, an interface is mainly used for achieving flexible object composition which is one of the core concept in Elements of Reusable Object-Oriented Software. Also, I think the primary benefit of an explicit contract is that it could provide loose coupling, flexibility and interchangeability of the implementation methods. It could also reduce the compile time but I don't think it is the main reason of using an interface.
@gauravvijaygupta6240
@gauravvijaygupta6240 4 жыл бұрын
It is my first time when i watch your video and it is my best experience now i will watch more video on different topic.
@kopilkaiser8991
@kopilkaiser8991 Жыл бұрын
Thank you for the video. I am watching it from London. I have learnt a great deal about C# interfaces.
@kiransaravade5127
@kiransaravade5127 2 жыл бұрын
great explanation .. shiv sir u cleared my wrong assumption about interfaces
@vsrrawat7954
@vsrrawat7954 2 жыл бұрын
Great explanation.....i like it very much....Thank you for this
@Sunstriderko
@Sunstriderko 4 жыл бұрын
definitely the best video about interfaces out there. Thanks for amazing job
@brioown
@brioown Жыл бұрын
Please keep your talk as possible as succinct. Too much of stray talk causes distraction and eventually loss of interest on the part of the listener.
@aagebadho6907
@aagebadho6907 3 жыл бұрын
Adding to all the points, Interfaces are required for dependency Injection ( which also helps us to do Unit Testing)
@abhishekr8021
@abhishekr8021 2 жыл бұрын
Thanks very much for making me understanding interfaces uses in realtime.
@rinzler9775
@rinzler9775 Жыл бұрын
LEGO had the original programming interface.
@pushpakshah4141
@pushpakshah4141 6 жыл бұрын
How Abstract class will get used in same example, for e.g. will be used in place where you shown abstraction with interface ?
@meenubatra6283
@meenubatra6283 5 жыл бұрын
Such a nice explanation of interface.Sir can you make a video on abstract class vs interface because abstract class can do whatever interface can do except multiple inheritance.
@KDOERAK
@KDOERAK 5 жыл бұрын
A great video: clear explanation, good examples! thx
@TellaTrix
@TellaTrix 6 жыл бұрын
Such superb explanation sir, We usually used interface for decoupled entity, but there has lot of things that we could use with interface.
@soomon3608
@soomon3608 5 жыл бұрын
Thank you so much for this video. I think I finally understood what interfaces are used for!
@navidkh1883
@navidkh1883 3 жыл бұрын
This is an awesome video. 👌 thanks very much.
@hansdevelde6326
@hansdevelde6326 Жыл бұрын
Thanks for this very clear explanation !
@tonygoyal5781
@tonygoyal5781 6 жыл бұрын
One of the best explanation on any topic ,i have ever seen. Thanx alot sir..
@Subbu_Sanju007
@Subbu_Sanju007 3 жыл бұрын
How to use interface in real time projects
@faisalkhanjalalia1966
@faisalkhanjalalia1966 5 жыл бұрын
Great explanation! However it would be a cherry on top if you could discuss about access modifiers while implementing interfaces.
@srikplaylist
@srikplaylist 5 жыл бұрын
It looked like greek language before watching this video, now it looks so simple. Thanks a TON!!!
@priyankakulkarni84
@priyankakulkarni84 2 жыл бұрын
Wonderful 😊. Many thanks
@RollinShultz
@RollinShultz Жыл бұрын
It does seem like Interfaces are great for separating concerns and also implementig methods not defined in the base class. I suppose they are mostly used to coommunicated view to viewModel etc. If I want to make a small application that's specific to a type of person, so using you maths model, let's say I want to use a math class for an application that calculates volumme of concrete to order for a job. I have the basic math class with +,-,*,/ methods, and an interface that implements the advanced maths for calculus and trig functions, and for my contractor who doesn't have any use for those advanced features, I make an interface for concrete calculating methods for volume, and square footage etc. which are relevant to the contractor application. It certainly makes the maths class smaller and eliminates the bloat which would be caused by including unneeded advanced methods. Maybe it utilizes a mobile phone UI so we want to keep the phone app small. However, we want the phone app to be part of a greater application product. Interfaces then would be better than multiple applications all from scratch.
@satishbau2184
@satishbau2184 3 жыл бұрын
It will achieve circular dependcy issue
@adapass
@adapass 5 жыл бұрын
Awesome explanation for even experienced programmers with very simple sample program.
@HeathInHeath
@HeathInHeath Жыл бұрын
Thank you for this video. I found your explanation and discussion to be very helpful in building my awareness of which situations would benefit from adding the abstractions of interfaces or the factory pattern.
@satish123mattaparti
@satish123mattaparti 5 жыл бұрын
Thank you best explanation, now i can feel the use the interface
@tomy7424
@tomy7424 4 жыл бұрын
I don't understand why implement a new interface when the change required is the same even if done with existing interface, seeing this example I know it's short in real world comparison but still, the change required was to implement new methods which is the same if multiply and divide methods were to add to IMaths , where else change is required? Just implementation of those new methods then we're ready to go? aren't we?
@MrBivanovs
@MrBivanovs 11 ай бұрын
The best description about subject
@saitejaadepu0811
@saitejaadepu0811 2 жыл бұрын
Good explanation thanks sir....
@yogeshnainwal8319
@yogeshnainwal8319 3 жыл бұрын
it ' too good explanation about interface.
@amitrajput7977
@amitrajput7977 2 жыл бұрын
SIR AGAR AAP ISI VIDIO KO 👉 HINDI M BNA LETE TO KAAFI BACHO KI HELP HO JATI SO PLZZ SIR AAP ISI VIDIO KO HINDI M CONVERT KRO
@swarupkrsinha
@swarupkrsinha 6 жыл бұрын
Thank you for the tutorial. I have a doubt: what do you suggest- Isn't wrong calling interface does "Inheritance". Inheritance is something we inherit from parents (in real world also), and which can be possible using Base class or abstract class. Using Interface its always "Implements" the properties or method from interface, even if we add multiple interface in a derived class, still it should call multiple implementation. I may be wrong, please clarify it.
@dnfvideo
@dnfvideo 6 жыл бұрын
yes i slipped at one place....Interfaces are always implemented.....
@swarupkrsinha
@swarupkrsinha 6 жыл бұрын
Thanks!
@250miles2
@250miles2 Жыл бұрын
This has to be the absolutely best video I've seen on interfaces. No contest. Every video has failed to show how code reuse actually happens and, really, how "multiple inheritance" occurs, when usingan interface. For me, the missing link was the Factory design pattern... I've watched this video about 4 times now, and every time I watch it, I pick up something new. Thank you for creating this!! Truly amazing work.
@jasonking1284
@jasonking1284 3 жыл бұрын
Over engineering at its finest. Why not just discipline employees and tell them, either you follow conventions, or you are fired.
@avinashgoyal8243
@avinashgoyal8243 2 ай бұрын
Best video for Interface I ahve ever seen!!
@fooballers7883
@fooballers7883 8 ай бұрын
Thank you for a very detail explanation about interfaces...
@vinokarthik99
@vinokarthik99 5 жыл бұрын
Thank you so much... You made it very clear
@ElighneArkaine
@ElighneArkaine 5 жыл бұрын
the factory lier
@fahadgolra1219
@fahadgolra1219 3 жыл бұрын
I really liked the video and the way things are explained. However, I do not agree with the final remarks that interfaces are only used when components are not in direct link with each other. They are also important for some of the design patterns like for example the strategy pattern.
@nishanthgmk3487
@nishanthgmk3487 3 жыл бұрын
Awesome explanation, can you make a video about Startup.cs, DI, constructor injection, overriding, etc. Your videos are the best to understand. Thanks for the great video
@jithinm5692
@jithinm5692 5 жыл бұрын
Thank you for the clear explanation
@omkarn2785
@omkarn2785 4 жыл бұрын
I have one doubt sir in this video By default interfaces are public right ? Why using public keyword Can you please explain
@inamcbscbs
@inamcbscbs 3 жыл бұрын
Now clear why we use interfaces
@PankajChauhan-jx1ie
@PankajChauhan-jx1ie 5 жыл бұрын
I have so much doubt on interfaces...because if they only contains signatures then why we can't use these methods direct from class...but i really appreciate the concept of caller and callee.....it clears my all doubts regarding interfaces..thankyou so much..
@amithaacharya
@amithaacharya Жыл бұрын
what a video!! Just loved it.
@adapass
@adapass 2 жыл бұрын
Awesome explanation of interface. I have never seen any article in google explaining the need of interfaces like this in a clear very simple way. Even a programmer with a very little knowledge on c# or oops can understand this. You are rocking. Please keep posting c# videos like this.
@imadabab
@imadabab 4 жыл бұрын
Good explanation. But I create an interface for every sub class to apply Dependency Injection. So I inject the interface in any UI implementation of the sub class.
@husamdarwish7009
@husamdarwish7009 5 жыл бұрын
Thank you so much Very clean and clear explanation Keep explaining mind defusing ideas in C#
@Ahmet-nd5ct
@Ahmet-nd5ct 3 жыл бұрын
Great explanation.thnls
@renganathane8185
@renganathane8185 3 жыл бұрын
I agree with your words.
@marziehfatemi7615
@marziehfatemi7615 2 жыл бұрын
Thanks for this video. I think the most important usage of the interface is for dip, Ioc and interface segregation rules of solid. and this happens when we create multiple layers when one layer needs another and we want to decouple them to loosely coupling.
@umerwaqas5943
@umerwaqas5943 2 жыл бұрын
That was just amazing opinion sir. Nicely explained.
@scotolivera8207
@scotolivera8207 3 жыл бұрын
FINALYYYYYYYYYYYYYY, Thanks a lot
@Hehe-k6j
@Hehe-k6j 4 жыл бұрын
Prasad Sir, Its great video and very good, clear and clarity explanations. Really, all my doubts are cleared regarding interface. Great Job, Thanks.
@shashikantrajak1784
@shashikantrajak1784 3 жыл бұрын
Even if you are using implicit conectarte you should use interface for mock testing and other purpose.
@renzybi5061
@renzybi5061 3 жыл бұрын
Best explanation of this topic! And ive seen alot. You have a knack for teaching brother! Many thanks
@mrchali-rl8es
@mrchali-rl8es 5 жыл бұрын
great explanation. Thank you so much for sharing
@NirajTiwariYoutube
@NirajTiwariYoutube 3 жыл бұрын
Best explanations- first time I have learn about interface in actual
@harishpoojary9183
@harishpoojary9183 6 жыл бұрын
Very clear presentation on interface. Thank you.
@technoblaze4467
@technoblaze4467 5 жыл бұрын
I do not agree with your statement every class need not to have interface , every class must have interface , we living in the world where customer always looks for change.
@bachelorcookingandeating1918
@bachelorcookingandeating1918 3 жыл бұрын
One of the best examplaction on the interface. This is the right way to use interface in real development Thank you so much sir ... For grate session
@yousufanwer99
@yousufanwer99 3 жыл бұрын
Best Explanation ever ,Please make video on polymorphism
@AkashKumar-kc5cp
@AkashKumar-kc5cp 3 жыл бұрын
Thank You so much.
@olympustech346
@olympustech346 3 жыл бұрын
hi new to interfaces, why did we connect the interface to the math-component and remove factory
@manjitsarma6592
@manjitsarma6592 4 жыл бұрын
This is it(end of all confusions surrounding Interface)..Awesome video.Thanks !!
@huntervanguard6423
@huntervanguard6423 6 жыл бұрын
Helped greatly with my understanding of how interfaces are to be used. Thanks a lot.
@SeanSmith73
@SeanSmith73 3 жыл бұрын
Superb presentation - thank you.
@learningislife2934
@learningislife2934 3 жыл бұрын
I am big fan sir
@syedhameedudeen5279
@syedhameedudeen5279 4 жыл бұрын
How to use methods of IMaths2 interface which was created and inherited
@fredmassey1062
@fredmassey1062 3 жыл бұрын
The best explanation I have found for understanding interfaces, and why they are used. Thank you.
@IndiaThatIsBhaarat
@IndiaThatIsBhaarat 6 жыл бұрын
Excellent!!! Thank you!!
@learnwithmoonlight4463
@learnwithmoonlight4463 3 жыл бұрын
Thank you so much for such nice explanation!!
@malayaprasadlenka9088
@malayaprasadlenka9088 3 жыл бұрын
Awesome 👍
@sanjaikhola7184
@sanjaikhola7184 5 жыл бұрын
Nice video very good explanation about Interface help for me a lot.
@asishdas6267
@asishdas6267 5 жыл бұрын
Don't we use multiple inheritance nature of interfaces to enable our working class to access methods from two different class libraries? Let's say if you had a logging library that you would want to use every time you do math operations.
@learningislife2934
@learningislife2934 4 жыл бұрын
Great sir
@anuragmohanty1238
@anuragmohanty1238 2 жыл бұрын
Excellent
@stoic2454
@stoic2454 4 жыл бұрын
Anyone knows who's the instructor in this video ?
@sarathbaiju6040
@sarathbaiju6040 4 жыл бұрын
Great video. Interface is also helpful for unit testing
@rudranarayan9958
@rudranarayan9958 Жыл бұрын
Fuzzy
@JohnStephen7
@JohnStephen7 4 жыл бұрын
A great explanation about interfaces and its benefits. Thank You so much
@emmadkareem5247
@emmadkareem5247 4 жыл бұрын
Thanks for your efforts. I see that removing the factory and dynamic concepts would have made your point much clearer.
@nisargshah5485
@nisargshah5485 4 жыл бұрын
I have seen lots of videos regarding this topic,but this is a best explaination ever about interface 💯
@salmanahmad2532
@salmanahmad2532 2 жыл бұрын
20:01: Correction: Interfaces contain only method declaration and not the definition. This means by default all the methods in an interface are the abstract method and public. Great explanation.
@salmanahmad2532
@salmanahmad2532 2 жыл бұрын
@.NET Interview Preparation videos
@CyberAbyss007
@CyberAbyss007 4 жыл бұрын
Thank you for this video. Just took a live online class last week so its sort of fresh in my head. It took me a bit to get it. Interfaces are like server side include templates but when we say contract just means the class template is enforced from a signature perspective. You don't put any code in the interface so its only useful depending on the circumstances. If you have a large code base with lots of classes with similar functionality then use interfaces so you can enforce class signatures and modify them as needed and if you want to consume less info than is in the base class. Again, thanks for the video. Creating classes as abstract all you designate classes as optional (can be overridden) in the using class using the override keyword.
C# Delegates explained
8:47
.NET Interview Preparation videos
Рет қаралды 516 М.
Inside Out 2: ENVY & DISGUST STOLE JOY's DRINKS!!
00:32
AnythingAlexia
Рет қаралды 13 МЛН
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 104 МЛН
What is Span in C# and why you should be using it
15:15
Nick Chapsas
Рет қаралды 255 М.
What is TPL ( Task Parallel Library) and how it differs from threads (c# interview questions) ?
13:29
IEnumerable 🆚 IEnumerator Interfaces in C#
34:06
tutorialsEU
Рет қаралды 28 М.
Master C# Interfaces in 12 Minutes - Beginner Tutorial
11:37
tutorialsEU - C#
Рет қаралды 21 М.
Post vs Put
23:43
.NET Interview Preparation videos
Рет қаралды 93 М.
Understand your C# queries! IEnumerable & IQueryable in explained
11:28
tutorialsEU - C#
Рет қаралды 37 М.
c# (Csharp) and .NET :- Difference between IEnumerable and IEnumerator.
13:39
.NET Interview Preparation videos
Рет қаралды 495 М.