I\'m working on a game engine in C#. The class I\'m working on is called CEntityRegistry, and its job is to keep track of the many instances of CEntity
Func> f = ty =>
{
var tysReturn = new List();
if (ty.BaseType != null)
{
tysReturn.Add(ty.BaseType);
}
tysReturn.AddRange(ty.GetInterfaces());
return tysReturn;
};
The function f will take a Type and return a list of its base type plus interfaces.