using System;
using System.Collections.Generic;
using System.Collections;
publicstaticclass CollectionUtils
{
publicstatic IEnumerable<T> Convert<T>(IEnumerable oldStyleSrc) where T : class
{
foreach (object o in oldStyleSrc)
{
T elem = o as T;
if (elem != null)
yield return elem;
}
}
}