private static bool IsGenericIList(Type propertyType) { return propertyType.GetGenericTypeDefinition() == typeof(IList<>); } }