M
Maurizio Colucci
Hi,
I have a function so defined
function foo (byval l as List(of IMyInterface)) as bar
I have a List(of C), where C implements IMyInterface.
I want to pass the list as input to foo, like
dim l = new list(of C)
dim result = foo(l)
but this does not compile (with option infer on). It seems VB can't
understand that a list of C is also a list of IMyInterface.
Am I missing something or type inference in VB is flawed? What
workaround do you suggest?
Thank you,
Maurizio
I have a function so defined
function foo (byval l as List(of IMyInterface)) as bar
I have a List(of C), where C implements IMyInterface.
I want to pass the list as input to foo, like
dim l = new list(of C)
dim result = foo(l)
but this does not compile (with option infer on). It seems VB can't
understand that a list of C is also a list of IMyInterface.
Am I missing something or type inference in VB is flawed? What
workaround do you suggest?
Thank you,
Maurizio