.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
Post a Comment