Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经声明了一个名为WorkerPool(Of T). 现在它接受所有类型(字符串、布尔值、整数等),除了我希望它只接受子类型Worker,比如FileWorker或MeshWorker。是否有可能做到这一点?
WorkerPool(Of T)
Worker
FileWorker
MeshWorker
你可以试试这个:
Public Class WorkerPool(Of T As Worker) End Class