private static void CreateWorker(ref datatype obj, Type t) { if (t == typeof(object)) return; CreateWorker(ref obj, t.BaseType); ... ...