All pastes #397526 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-03-16 15:38 UTC
rendered paste body
using System;
using System.Collections;

class Pool<T>  where T : class {
}

class SubPool<T> : Pool<T> where T : class, ICloneable { 
    public void DoSomething(T o) {
        T clone_o = o.Clone();
        Console.WriteLine(clone_o);
    }   
}

class MainThing {
    public static void Main(string[] args) {
        Pool<ArrayList> pool = new Pool<ArrayList>();
        pool.DoSomething(new ArrayList());
    }   
}