.net - Create a List of a Referenced Type -


this question has answer here:

i attempting create function pass type of object , function use type create list of object.gettype

public function dosomething(byref objecttype type)     dim list list(of objecttype)      return 0 end function 

the problem having list creation proccess doesn't accept reference types in construction.

i've tried passing on object object , use .gettype() function create list doesn't accept also.

any me appreciated, in advance.

try this:

public function dosomething(byref objecttype type) ilist     return ctype(activator.createinstance(gettype(list(of )).makegenerictype(objecttype)), ilist) end function 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -