C# Interfaces Explained in Simple Terms | Mosh


C# Interfaces Tutorial

🔥Get the COMPLETE course:





  1. Hi Mosh, I'm a big follower of you and I took your lecture on C# intermediate course. I usually code following you. But in the interfaces & testability lecture "shipment.cs" file is not visible during the lecture. Is it possible to get the code of that file?

  2. Weak stuff that has turned me off ever buying one of your courses. its fine to not cover everything in a free video but its not fine to title it as covering a subject it doesn't. This is no real explanation but just basically an analogy and a marketing ploy – buy my course if you want the real explanation. You are better than that.

  3. If you really wanna know what an interface is and you currently have no idea like i havent had go ahead and watch this video called "Interfaces in C# – What they are, how to use them, and why they are so powerful." by a youtube channel called "IAmTimCorey". Hope i helped.

  4. So you abstract even further until your code becomes an unreadable mess, why not do what OOP actually is which is to only have depencencies directly when they are strictly needed (next node in a dependency graph) and process through a series of those which can unlike interfaces be properly stacktraced.

  5. I took time out of MY day to log into my you tube account just to down vote this video and call you a cunt in the comments.

  6. I'm a huge fan of most of your courses. I'm on your C# intermediate course, and the video following this one called "Interfaces and Testing" needs much more diagramming to really explain it. It's really the first of your videos I've had any complaint about. But after 4 watchings, I'm gonna have to look for someone else's explanation.

  7. Useless explanation. Came here to learn about interface in c#, what I got was a useless analogy without any written code.

  8. So basically you want more than the add revenue from this video and for me to sign up. Damn would have subscribed and you would have got more add revenue from me if this was complete. Goodbye.

  9. seems pointless. why not just use an abstract function in a class instead and derive from that?
    In fact I would think that's a rather dumb thing to do.
    For example, if you create a class TaxCalculator and declare and implement the methods there, you do it once. if you do the interface, you need to write the same code for calculating taxes in every single class that you implement the interface in.
    As for the chef analogy: a chef can cook. so if you tell your chef to cook spaghetti you implement the spaghetti cooking for every single class of chef, even though the process is exactly the same. so if you want to change how taxes are calculated or how spaghetti is made, you need to rewrite the same stuff in all your classes. that's just bad coding practice.


Please enter your comment!
Please enter your name here