A fellow OOP beginner here. I just had to do an exercise, where i had to create a custom class in C#, and on the homework TODO's there was a requirement to implement the IENumerable and IENumerator interfaces, and create a custom Queue of my custom class type objects.
While i had no issues solving the problem, i still don't understand the usage of this. Instead of writing so much code to implement a custom Queue, why not simply use the already existing "Queue" from the C# Framework? Is there any performance/optimisation advantage from this ?
So, is there any gain in using MyCustomObjectQueue, instead of using Queue<'MyCustomObject'> ?