lundi 22 novembre 2021

Need help understanding a line of code I've seen online [closed]

I am learning c# and was looking at design patterns and I came across a line I feel like I've seen before but can't remember what it does.

https://dotnettutorials.net/lesson/decorator-design-pattern-real-time-example/

On step 3 it says protected Pizza pizza, it's creating a protected variable called pizza but why does it use the Interface to create this variable. If possible could you direct me to a page to read up on this as I can't search it as I don't know how to word it. Sorry for the dumb question.

Aucun commentaire:

Enregistrer un commentaire