Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to do nested generic classes (if that's the appropriate name) in csharp

Tags:

I'd like to create a class of the following type

public class EnumerableDisposer<IEnumerable<IDisposable>>

But it won't let me declare it this way. I've also tried:

public class EnumerableDisposer<T> : IDisposable where T : IEnumerable<J> where J : IDisposable

But the compiler tells me that the type/namespace J could not be found.

What is it I have to do to create this class?