public void Process <type>(type parameter) where type : class
 {
     if (parameter is CollectionClass)
     {
         Console.WriteLine("CollectionClass");
     }
     else if (parameter is SingleClass)
     {
         SingleClass cls = parameter as SingleClass;
         Console.WriteLine("SingleClass (" + cls.Buffer + ")");
     }
 }
 public void AddElement(SingleClass cls)
 {
     _elements.Add(cls);
 }