.net - How does the compiler choose the target overload with two interface methods sharing the same signature except one is generic? -
system.collections.generic.list(of t) implements system.collections.ienumerable , system.collections.generic.ienumerable(of t) , each have getenumerator() method (respectively): function getenumerator() system.collections.ienumerator function getenumerator() system.collections.generic.ienumerator(of t) assume have mylist instance of system.collections.generic.list(of t) ; if call mylist.getenumerator() , compiler targets function getenumerator() system.collections.generic.ienumerator(of t) , function getenumerator() system.collections.ienumerator hidden intellisense list. indeed, if @ system.collections.generic.list(of t) using ilspy, latter overload missing. i want create own collection class implements 2 interfaces, have this: class myitemcollection implements system.collections.ienumerable, system.collections.generic.ienumerable(of item) private _items new system.collections.generic.list(of item) public function getenumerator() ienumerator(...