private static bool checkVersion(Type type, string field, int requestedApiVersion) { if (requestedApiVersion == 0) { return(true); } var min = AApiVersionedFields.MinimumVersion(type, field); if (min != 0 && requestedApiVersion < min) { return(false); } var max = AApiVersionedFields.MaximumVersion(type, field); if (max != 0 && requestedApiVersion > max) { return(false); } return(true); }