Type GetPublicRuntimeType(object symVal) { Type symType = null; if (symVal != null) { symType = symVal.GetType(); while (! symType.IsPublic) symType = symType.BaseType; } return symType; }