I'm trying to overload an operator in C# (don't ask why!) that applies to Lists
. For example, I'd like to be able to write:
List<string> x = // some list of things
List<string> y = // some list of things
List<string> z = x + y
so that 'z' contains all the contents of 'x' followed by the contents of 'y'. I'm aware that there are already ways to combine two lists, I'm just trying to understand how operator overloading works with generic structures.
(This is the List
class from Systems.Collections.Generic
, by the way.)