Skip to content

IComparableExtensions

Range-membership test for any IComparable value, with boundary-inclusivity controlled by IncludeComparisons. (BR-036)

Purpose

  • Range-membership test for any IComparable value, with boundary-inclusivity controlled by IncludeComparisons. (BR-036)

Context

  • Namespace: SAIF.Common.Extensions
  • Assembly/package: SAIF.Framework.Common

Public members

Member Signature Purpose
IsBetween(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)
IsBetween(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)

Sources

  • Common/SAIF.Common/Extensions/IComparableExtensions.cs