krixsick
krixsick
CC#
Created by krixsick on 7/12/2023 in #help
❔ Interfaces, IEnumerator and IEnumerable
Haha thanks, I appreciate the help!
35 replies
CC#
Created by krixsick on 7/12/2023 in #help
❔ Interfaces, IEnumerator and IEnumerable
Ohh I see what you mean, by having that there, it's much more clear to the user and me on what the code is actually doing, Got it, thank you so much for the tip
35 replies
CC#
Created by krixsick on 7/12/2023 in #help
❔ Interfaces, IEnumerator and IEnumerable
So wouldn't it be cleaner if you just don't state the interface?
35 replies
CC#
Created by krixsick on 7/12/2023 in #help
❔ Interfaces, IEnumerator and IEnumerable
Cause if you write an interface, you would have to write the sum method inside the class regardless right?
35 replies
CC#
Created by krixsick on 7/12/2023 in #help
❔ Interfaces, IEnumerator and IEnumerable
I see, but wouldn't it be better to just add a method for that in the class without writing an interface?
35 replies
CC#
Created by krixsick on 7/12/2023 in #help
❔ Interfaces, IEnumerator and IEnumerable
I appreciate your help and responses! Thank you!
35 replies
CC#
Created by krixsick on 7/12/2023 in #help
❔ Interfaces, IEnumerator and IEnumerable
Ok i'll try looking more into that
35 replies
CC#
Created by krixsick on 7/12/2023 in #help
❔ Interfaces, IEnumerator and IEnumerable
By object in this case, it refers to various types of datatypes?
35 replies
CC#
Created by krixsick on 7/12/2023 in #help
❔ 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
CC#
Created by krixsick on 7/12/2023 in #help
❔ Interfaces, IEnumerator and IEnumerable
So this IEnumerator allows me to loop through my object collection?
35 replies
CC#
Created by krixsick on 7/12/2023 in #help
❔ Interfaces, IEnumerator and IEnumerable
And yea I haven't seen dependency injection yet 😭
35 replies
CC#
Created by krixsick on 7/12/2023 in #help
❔ 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
CC#
Created by krixsick on 7/12/2023 in #help
❔ Interfaces, IEnumerator and IEnumerable
By custom collections, does that mean like collections that aren't generic?
35 replies
CC#
Created by krixsick on 7/12/2023 in #help
❔ Interfaces, IEnumerator and IEnumerable
Sorry, I'm just a little confused by what you mean on the case where you have to replace a service with a fake version that gives you specific results to test against
35 replies
CC#
Created by krixsick on 7/8/2023 in #help
❔ C# Inheritance Topic Question Mostly about base constructors
OH ok, I think im starting to understand, tysm for the help
22 replies
CC#
Created by krixsick on 7/8/2023 in #help
❔ C# Inheritance Topic Question Mostly about base constructors
If it were the same I wouldn't
22 replies
CC#
Created by krixsick on 7/8/2023 in #help
❔ C# Inheritance Topic Question Mostly about base constructors
Then I would need to write it
22 replies
CC#
Created by krixsick on 7/8/2023 in #help
❔ C# Inheritance Topic Question Mostly about base constructors
If it was a different field for the sub class
22 replies
CC#
Created by krixsick on 7/8/2023 in #help
❔ C# Inheritance Topic Question Mostly about base constructors
I only understand private and public rn 😅
22 replies
CC#
Created by krixsick on 7/8/2023 in #help
❔ C# Inheritance Topic Question Mostly about base constructors
different variables
22 replies