Relative Content

Tag Archive for c#foreachiteratoroverloading

Smarter way to overload methods?

I have a class called Block that has a Draw method. I want to make a function that draws a group of blocks all at once. Since some groups are Arrays and some are lists, I had to add an overload that basically does the same thing as the base function but just takes in a different type of parameter. Any ideas on how to improve this code?