a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
31 lines
433 B
C#
31 lines
433 B
C#
using System;
|
|
|
|
namespace test2
|
|
{
|
|
public class Test<T, U, V>
|
|
where T : U, new ()
|
|
where U : V, new ()
|
|
where V : IDisposable, new ()
|
|
{
|
|
|
|
public void Method ()
|
|
{
|
|
IDisposable t = new T ();
|
|
IDisposable u = new U ();
|
|
IDisposable v = new V ();
|
|
}
|
|
}
|
|
|
|
class MainClass : IDisposable
|
|
{
|
|
public void Dispose ()
|
|
{
|
|
}
|
|
|
|
public static void Main ()
|
|
{
|
|
new Test<MainClass, MainClass, MainClass> ().Method ();
|
|
}
|
|
}
|
|
}
|