How to declare variable for open generic type? Possible?
Is there a way to declare a vaiable for an open generic type?

Given: There is a generic class Logger<T> that users get from a factory method. Is there a way to have a variable that can hold ANY logger?

Right now Logger<T> inherits from Logger ONLY for being able to declare a variable for an instance without caring what type is logged there.

I use MEF, and in the exports I can use a syntax like [Export(typeof(Logger<>))] to export a generic type... (specifying the exact type on import) so there is some support for open types (at least in typeof). What I need now is a syntax like

Logger<> Logger { get; set; }

Any possibility to do something like that? This particular syntax gets me "Type needed".
How to declare variable for open generic type? Possible?
===

Is there a way to declare a vaiable for an open generic type?

Given: There is a generic class Logger<T> that users get from a factory method. Is there a way to have a variable that can hold ANY logger?

Right now Logger<T> inherits from Logger ONLY for being able to declare a variable for an instance without caring what type is logged there.

I use MEF, and in the exports I can use a syntax like [Export(typeof(Logger<>))] to export a generic type... (specifying the exact type on import) so there is some support for open types (at least in typeof). What I need now is a syntax like

Logger<> Logger { get; set; }

Any possibility to do something like that? This particular syntax gets me "Type needed".