krixsick
❔ Interfaces, IEnumerator and IEnumerable
I see, so if it were a non generic, I would use the one at the bottom because that would account for the types of objects inside that collection. For the one that returns the dog collection, Does the IEnumerable<Dog> part allow the .GetEnumerator() to function? So like without INumerable<Dog> we wouldn't be able to use .GetEnumerator()? as well, the IEnumerator just allows us to check the current object in the collection and move on to the next object in the collection
35 replies
❔ Interfaces, IEnumerator and IEnumerable
Ohh so like you have an interface called IEmailServices and a class that uses that inerface. Inside this inteface, we place like an empty method but acts like a placeholder until we want to send the actual email?
35 replies