Type bar
is specified as an instance of Type
class and passed to method Foo(Type bar)
.
A generic method Foo<bar>
is in another assembly that needs the type argument bar
.
How can I pass bar
as a type argument for Foo<bar>
?
It should look something like this:
object Foo(Type bar) { return AnotherAssembly.Foo<barAsTypeArgument>(); }