---
title: IComparableExtensions
summary: API reference for IComparableExtensions.
status: draft
owner: saif-docgen
last_reviewed: 2026-09-15
library: SAIF.Framework.Common
reference_type: package
---

# IComparableExtensions

Range-membership test for any `IComparable` value, with boundary-inclusivity controlled by `IncludeComparisons`. ([BR-036](../../business-rules.md#br-036-the-default-date-in-range-inclusivity-is-firstonly-%E2%80%94-begin-date-inclusive%2C-end-date-exclusive))

## Purpose
- Range-membership test for any `IComparable` value, with boundary-inclusivity controlled by `IncludeComparisons`. ([BR-036](../../business-rules.md#br-036-the-default-date-in-range-inclusivity-is-firstonly-%E2%80%94-begin-date-inclusive%2C-end-date-exclusive))

## Context
- Namespace: `SAIF.Common.Extensions`
- Assembly/package: `SAIF.Framework.Common`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| IsBetween<T>(this T value, T low, T high) | `public static bool IsBetween<T>(this T value, T low, T high) where T : IComparable` | Tests whether `value` lies between `low` and `high`, both boundaries inclusive by default. ([BR-036](../../business-rules.md#br-036-the-default-date-in-range-inclusivity-is-firstonly-%E2%80%94-begin-date-inclusive%2C-end-date-exclusive)) |
| IsBetween<T>(this T value, T low, T high, IncludeComparisons comparison) | `public static bool IsBetween<T>(this T value, T low, T high, IncludeComparisons comparison) where T : IComparable` | Tests whether `value` lies between `low` and `high`, honoring the requested boundary-inclusivity mode. ([BR-036](../../business-rules.md#br-036-the-default-date-in-range-inclusivity-is-firstonly-%E2%80%94-begin-date-inclusive%2C-end-date-exclusive)) |


## Sources
- `Common/SAIF.Common/Extensions/IComparableExtensions.cs`
