Is there any difference in performance between returning a List<String>
or returning a StringList
? where StringList would be defined as
class StringList : List<String> { }
This would also count for any other defined list such as IntList
or ObjectList
or ControlList
or MyCustomClassList
, all defined in a similar way.
The only difference i have seen is readability within the code, would any performance differences be optimised away by the compiler?
Secondly, is there a better way to define StringList or is this way the only way?