1 interface inheriting from IComparable
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Numerics\INumber.cs (1)
12: IComparable,
90 implementations of IComparable
dotnet-svcutil-lib (2)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImplHelpers.cs (1)
342private class NodeData : IComparable
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (1)
720private class SchemaDatatypeMap : IComparable
Microsoft.AspNetCore.Routing (2)
Matching\HostMatcherPolicy.cs (1)
398private readonly struct EdgeKey : IEquatable<EdgeKey>, IComparable<EdgeKey>, IComparable
Matching\HttpMethodMatcherPolicy.cs (1)
441internal readonly struct EdgeKey : IEquatable<EdgeKey>, IComparable<EdgeKey>, IComparable
Microsoft.Build (1)
BackEnd\Components\RequestBuilder\ItemBucket.cs (1)
22internal sealed class ItemBucket : IComparable
Microsoft.Build.Tasks.Core (1)
RedistList.cs (1)
936internal class AssemblyTableInfo : IComparable
Microsoft.CodeAnalysis.UnitTests (5)
Collections\HashSet\TestingTypes.cs (5)
47public class EquatableBackwardsOrder : IEquatable<EquatableBackwardsOrder?>, IComparable<EquatableBackwardsOrder>, IComparable 177public struct SimpleInt : IStructuralComparable, IStructuralEquatable, IComparable, IComparable<SimpleInt> 274public class NonGenericComparable : IComparable 287public class BadlyBehavingComparable : IComparable<BadlyBehavingComparable>, IComparable 294public class MutatingComparable : IComparable<MutatingComparable>, IComparable
Microsoft.DotNet.XUnitAssert.Tests (2)
EqualityAssertsTests.cs (2)
4384 class MultiComparable : IComparable 4562 class SpyComparable : IComparable
Microsoft.ML.TimeSeries (1)
RootCauseAnalyzer.cs (1)
766internal class BestDimension : IComparable
PresentationCore (3)
MS\Internal\Ink\Lasso.cs (1)
543private struct LassoCrossing : IComparable
MS\Internal\IO\Packaging\NetStream.cs (1)
803private class Block: IComparable
System\Windows\Media\Animation\ResolvedKeyFrameEntry.cs (1)
8internal struct ResolvedKeyFrameEntry : IComparable
PresentationFramework (8)
System\Windows\Documents\FixedLineResult.cs (1)
17internal sealed class FixedLineResult : IComparable
System\Windows\Documents\FixedNode.cs (1)
64internal struct FixedNode : IComparable
System\Windows\Documents\FixedSOMContainer.cs (1)
11internal abstract class FixedSOMContainer :FixedSOMSemanticBox, IComparable
System\Windows\Documents\FixedSOMGroup.cs (1)
13internal class FixedSOMGroup :FixedSOMPageElement, IComparable
System\Windows\Documents\FixedSOMSemanticBox.cs (1)
14internal abstract class FixedSOMSemanticBox : IComparable
System\Windows\Documents\FixedSOMTextRun.cs (1)
17internal sealed class FixedSOMTextRun : FixedSOMElement, IComparable
System\Windows\Documents\FlowNode.cs (1)
28internal sealed class FlowNode : IComparable
System\Windows\Documents\FlowPosition.cs (1)
26internal sealed class FlowPosition : IComparable
Shared (1)
StringSplit\StringRange.cs (1)
16internal readonly struct StringRange : IComparable, IComparable<StringRange>, IEquatable<StringRange>
System.Data.Common (15)
System\Data\SQLTypes\SQLBinary.cs (1)
15public struct SqlBinary : INullable, IComparable, IXmlSerializable, IEquatable<SqlBinary>
System\Data\SQLTypes\SQLBoolean.cs (1)
21public struct SqlBoolean : INullable, IComparable, IXmlSerializable, IEquatable<SqlBoolean>
System\Data\SQLTypes\SQLByte.cs (1)
21public struct SqlByte : INullable, IComparable, IXmlSerializable, IEquatable<SqlByte>
System\Data\SQLTypes\SQLDateTime.cs (1)
24public struct SqlDateTime : INullable, IComparable, IXmlSerializable, IEquatable<SqlDateTime>
System\Data\SQLTypes\SQLDecimal.cs (1)
21public struct SqlDecimal : INullable, IComparable, IXmlSerializable, IEquatable<SqlDecimal>
System\Data\SQLTypes\SQLDouble.cs (1)
22public struct SqlDouble : INullable, IComparable, IXmlSerializable, IEquatable<SqlDouble>
System\Data\SQLTypes\SQLGuid.cs (1)
23public struct SqlGuid : INullable, IComparable, ISerializable, IXmlSerializable, IEquatable<SqlGuid>
System\Data\SQLTypes\SQLInt16.cs (1)
20public struct SqlInt16 : INullable, IComparable, IXmlSerializable, IEquatable<SqlInt16>
System\Data\SQLTypes\SQLInt32.cs (1)
20public struct SqlInt32 : INullable, IComparable, IXmlSerializable, IEquatable<SqlInt32>
System\Data\SQLTypes\SQLInt64.cs (1)
21public struct SqlInt64 : INullable, IComparable, IXmlSerializable, IEquatable<SqlInt64>
System\Data\SQLTypes\SQLMoney.cs (1)
24public struct SqlMoney : INullable, IComparable, IXmlSerializable, IEquatable<SqlMoney>
System\Data\SQLTypes\SQLSingle.cs (1)
20public struct SqlSingle : INullable, IComparable, IXmlSerializable, IEquatable<SqlSingle>
System\Data\SQLTypes\SQLString.cs (1)
37public struct SqlString : INullable, IComparable, IXmlSerializable, IEquatable<SqlString>
System\Data\XDRSchema.cs (1)
217private sealed class NameType : IComparable
System\Data\XMLSchema.cs (1)
1771private sealed class NameType : IComparable
System.Private.CoreLib (43)
src\libraries\System.Private.CoreLib\src\System\Boolean.cs (1)
17: IComparable,
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
17: IComparable,
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
23: IComparable,
src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (1)
17: IComparable,
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
50: IComparable,
src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (1)
39: IComparable,
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
64IComparable,
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
22: IComparable,
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
22public abstract partial class Enum : ValueType, IComparable, ISpanFormattable, IConvertible
src\libraries\System.Private.CoreLib\src\System\Guid.cs (1)
25IComparable,
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
21: IComparable,
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
19: IComparable,
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
19: IComparable,
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
19: IComparable,
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
29IComparable,
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
19: IComparable,
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
22: IComparable,
src\libraries\System.Private.CoreLib\src\System\String.cs (1)
27: IComparable,
src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (1)
30readonly struct Rune : IComparable, IComparable<Rune>, IEquatable<Rune>
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (1)
16: IComparable,
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (1)
30: IComparable,
src\libraries\System.Private.CoreLib\src\System\Tuple.cs (8)
105public class Tuple<T1> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple 222public class Tuple<T1, T2> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple 344public class Tuple<T1, T2, T3> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple 476public class Tuple<T1, T2, T3, T4> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple 618public class Tuple<T1, T2, T3, T4, T5> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple 770public class Tuple<T1, T2, T3, T4, T5, T6> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple 932public class Tuple<T1, T2, T3, T4, T5, T6, T7> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple 1104public class Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> : IStructuralEquatable, IStructuralComparable, IComparable, ITupleInternal, ITuple where TRest : notnull
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
19: IComparable,
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
19: IComparable,
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
19: IComparable,
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
29IComparable,
src\libraries\System.Private.CoreLib\src\System\ValueTuple.cs (9)
35: IEquatable<ValueTuple>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple>, IValueTupleInternal, ITuple 264: IEquatable<ValueTuple<T1>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1>>, IValueTupleInternal, ITuple 428: IEquatable<ValueTuple<T1, T2>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2>>, IValueTupleInternal, ITuple 630: IEquatable<ValueTuple<T1, T2, T3>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3>>, IValueTupleInternal, ITuple 829: IEquatable<ValueTuple<T1, T2, T3, T4>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4>>, IValueTupleInternal, ITuple 1046: IEquatable<ValueTuple<T1, T2, T3, T4, T5>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5>>, IValueTupleInternal, ITuple 1281: IEquatable<ValueTuple<T1, T2, T3, T4, T5, T6>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5, T6>>, IValueTupleInternal, ITuple 1534: IEquatable<ValueTuple<T1, T2, T3, T4, T5, T6, T7>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5, T6, T7>>, IValueTupleInternal, ITuple 1805: IEquatable<ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>>, IValueTupleInternal, ITuple
src\libraries\System.Private.CoreLib\src\System\Version.cs (1)
22public sealed class Version : ICloneable, IComparable, IComparable<Version?>, IEquatable<Version?>, ISpanFormattable, IUtf8SpanFormattable, IUtf8SpanParsable<Version>
System.Private.Xml (4)
System\Xml\Core\XmlTextReaderImplHelpers.cs (1)
333private sealed class NodeData : IComparable
System\Xml\Schema\DataTypeImplementation.cs (1)
706private sealed class SchemaDatatypeMap : IComparable
System\Xml\Xsl\Runtime\XmlSortKey.cs (1)
14internal abstract class XmlSortKey : IComparable
System\Xml\Xsl\XPathConvert.cs (1)
1687private sealed class BigInteger : IComparable
System.Runtime.Numerics (1)
System\Numerics\BigInteger.cs (1)
19IComparable,
UIAutomationTypes (1)
System\Windows\Automation\AutomationIdentifier.cs (1)
23public class AutomationIdentifier : IComparable
193 references to IComparable
Aspire.Dashboard (1)
Otlp\Model\MetricValues\MetricValue.cs (1)
32if (Value is IComparable a && obj is MetricValue<T> other)
dotnet-svcutil-lib (1)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImplHelpers.cs (1)
685int IComparable.CompareTo(object obj)
Microsoft.Arcade.Test.Common (2)
AssertEx.cs (2)
81var comparable = x as IComparable;
Microsoft.Build.BuildCheck.UnitTests (1)
EditorConfig_Tests.cs (1)
77if (x is IComparable comparable)
Microsoft.Build.Tasks.UnitTests (1)
MockFaultInjectionHelper.cs (1)
11where FailurePointEnum : IComparable
Microsoft.CodeAnalysis.CodeStyle (12)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
12public static int CompareTo<T, S>(T first, T second, S state, ImmutableArray<Func<T, S, IComparable>> comparableMethods) 26public static int CompareTo<T>(T first, T second, ImmutableArray<Func<T, IComparable>> comparableMethods)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
26.OfType<IComparable>() 38var largest = orderedExistingConstants[0]; 46var nextValue = Add(orderedExistingConstants[0], i); 71private static IComparable Multiply(IComparable value, uint number) 85private static IComparable Add(IComparable value, uint number) 99private static bool GreaterThanOrEqualsZero(IComparable value) 113private static bool LooksLikeFlagsEnum(List<IComparable> existingConstants)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (1)
26public static bool HasOneBitSet(IComparable value)
Microsoft.CodeAnalysis.CSharp.Features (1)
Organizing\Organizers\ModifiersOrganizer.Comparer.cs (1)
36private static readonly ImmutableArray<Func<SyntaxToken, IComparable>> s_comparers =
Microsoft.CodeAnalysis.EditorFeatures (1)
Shared\Utilities\VirtualTreePoint.cs (1)
61private static readonly ImmutableArray<Func<VirtualTreePoint, IComparable>> s_comparers =
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
NavigateTo\AbstractNavigateToTests.cs (1)
225private static readonly ImmutableArray<Func<NavigateToItem, IComparable>> s_comparisonComponents =
Microsoft.CodeAnalysis.Features (3)
AddImport\References\Reference.cs (1)
57private static readonly ImmutableArray<Func<Reference, Document, IComparable>> s_comparers
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (2)
166compareMethod.Name != nameof(IComparable.CompareTo); 213generator.MemberAccessExpression(leftExpression, nameof(IComparable.CompareTo)),
Microsoft.CodeAnalysis.Test.Utilities (1)
Assert\AssertEx.cs (1)
90if (x is IComparable comparable)
Microsoft.CodeAnalysis.UnitTests (1)
Collections\HashSet\TestingTypes.cs (1)
76int IComparable.CompareTo(object? obj)
Microsoft.CodeAnalysis.Workspaces (13)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
12public static int CompareTo<T, S>(T first, T second, S state, ImmutableArray<Func<T, S, IComparable>> comparableMethods) 26public static int CompareTo<T>(T first, T second, ImmutableArray<Func<T, IComparable>> comparableMethods)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (9)
26.OfType<IComparable>() 38var largest = orderedExistingConstants[0]; 46var nextValue = Add(orderedExistingConstants[0], i); 71private static IComparable Multiply(IComparable value, uint number) 85private static IComparable Add(IComparable value, uint number) 99private static bool GreaterThanOrEqualsZero(IComparable value) 113private static bool LooksLikeFlagsEnum(List<IComparable> existingConstants)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IntegerUtilities.cs (1)
26public static bool HasOneBitSet(IComparable value)
SymbolSearch\ISymbolSearchService.cs (1)
133private static readonly ImmutableArray<Func<PackageWithAssemblyResult, IComparable>> s_comparers =
Microsoft.DotNet.NuGetRepack.Tests (2)
TestHelpers\AssertEx.cs (2)
81var comparable = x as IComparable;
Microsoft.DotNet.XUnitAssert.Tests (8)
EqualityAssertsTests.cs (8)
251 Assert.Equal(expected, (IComparable)actual); 275 assertFailure(() => Assert.Equal(expected, (IComparable)actual)); 285 Assert.Equal(expected, (IComparable)actual); 308 assertFailure(() => Assert.Equal(expected, (IComparable)actual)); 2586 assertFailure(() => Assert.NotEqual(expected, (IComparable)actual)); 2597 Assert.NotEqual(expected, (IComparable)actual); 2620 assertFailure(() => Assert.NotEqual(expected, (IComparable)actual)); 2630 Assert.NotEqual(expected, (IComparable)actual);
Microsoft.ML.AutoML (10)
Sweepers\ISweeper.cs (2)
163IComparable MetricValue { get; } 225IComparable IRunResult.MetricValue
TrainerExtensions\TrainerExtensionUtil.cs (2)
237private static void SetValue(FieldInfo fi, IComparable value, object obj, Type propertyType) 289SetValue(fi, (IComparable)dp.Options[optIndex], obj, propType);
Utils\SweepableParamAttributes.cs (6)
18private IComparable _rawValue; 19public virtual IComparable RawValue 33public virtual IComparable ProcessedValue() => _rawValue; 61public override IComparable RawValue 118public override IComparable ProcessedValue() => (IComparable)Options[(int)RawValue];
Microsoft.ML.Core (19)
EntryPoints\EntryPointUtils.cs (4)
29(range.Min == null || ((IComparable)range.Min).CompareTo(val) <= 0) && 30(range.Inf == null || ((IComparable)range.Inf).CompareTo(val) < 0) && 31(range.Max == null || ((IComparable)range.Max).CompareTo(val) >= 0) && 32(range.Sup == null || ((IComparable)range.Sup).CompareTo(val) > 0);
EntryPoints\ModuleArgs.cs (15)
167Contracts.Check(_max == null || ((IComparable)_max).CompareTo(value) != -1, 169Contracts.Check(_sup == null || ((IComparable)_sup).CompareTo(value) == 1, 186Contracts.Check(_min == null || ((IComparable)_min).CompareTo(value) != 1, 188Contracts.Check(_inf == null || ((IComparable)_inf).CompareTo(value) == -1, 205Contracts.Check(_max == null || ((IComparable)_max).CompareTo(value) == 1, 207Contracts.Check(_sup == null || ((IComparable)_sup).CompareTo(value) == 1, 224Contracts.Check(_min == null || ((IComparable)_min).CompareTo(value) == -1, 226Contracts.Check(_inf == null || ((IComparable)_inf).CompareTo(value) == -1, 237Contracts.Check(val is IComparable, "Type for range attribute must support IComparable"); 284private IComparable _rawValue; 285public virtual IComparable RawValue 299public virtual IComparable ProcessedValue() => _rawValue; 333public override IComparable RawValue 398public override IComparable ProcessedValue() => (IComparable)Options[(int)RawValue];
Microsoft.ML.FastTree (7)
Utils\Algorithms.cs (7)
19public static int FindFirstGE<T>(T[] array, T val) where T : IComparable 58public static int FindLastLE<T>(T[] array, T val) where T : IComparable 100public static int TopK<T>(T[] array, int offset, int length, T[] topK, int[] topKPositions) where T : IComparable 128public static T Min<T>(T[] array, out int argmin) where T : IComparable 149public static T[] MergeSortedUniqued<T>(T[][] arrays) where T : IComparable 170private static int MergeSortedUniqued<T>(int[] begins, int fromArray, int toArray, T[] working, T[] tmp) where T : IComparable 193public static int MergeSortedUniqued<T>(T[] input1, int begin1, int end1, T[] input2, int begin2, int end2, T[] output, int beginOutput) where T : IComparable
Microsoft.ML.Sweeper (2)
ISweeper.cs (2)
192IComparable MetricValue { get; } 261IComparable IRunResult.MetricValue
Microsoft.VisualBasic.Core (2)
Microsoft\VisualBasic\CompilerServices\ObjectFlowControl.vb (2)
365Dim icompare As IComparable 369icompare = CType(loopFor._counter, IComparable)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
290[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IComparable))]
netstandard (1)
netstandard.cs (1)
865[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IComparable))]
PresentationCore (1)
MS\Internal\IO\Packaging\NetStream.cs (1)
852int IComparable.CompareTo(object x)
PresentationFramework (5)
System\Windows\Controls\DataGridColumn.cs (1)
1177if (!typeof(IComparable).IsAssignableFrom(propertyType))
System\Windows\Documents\FixedSOMContainer.cs (1)
26int IComparable.CompareTo(object comparedObj)
System\Windows\Documents\FixedSOMGroup.cs (1)
29int IComparable.CompareTo(object comparedObj)
System\Windows\Documents\FixedSOMSemanticBox.cs (1)
171int IComparable.CompareTo(object o)
System\Windows\Documents\FixedSOMTextRun.cs (1)
35int IComparable.CompareTo(object comparedObj)
System.Collections.Immutable (4)
System\Collections\Immutable\ImmutableList_1.cs (3)
67/// the <see cref="IComparable"/> interface for type <typeparamref name="T"/>. 89/// or the <see cref="IComparable"/> interface for type <typeparamref name="T"/>. 122/// or the <see cref="IComparable"/> interface for type <typeparamref name="T"/>.
System\Collections\Immutable\ImmutableList_1.Node.cs (1)
649/// or the <see cref="IComparable"/> interface for type <typeparamref name="T"/>.
System.Collections.Specialized (1)
src\libraries\System.Private.CoreLib\src\System\Collections\CompatibleComparer.cs (1)
39if (a is IComparable ia)
System.ComponentModel.Annotations (11)
System\ComponentModel\DataAnnotations\RangeAttribute.cs (11)
108private void Initialize(IComparable minimum, IComparable maximum, Func<object, object?> conversion) 161var min = (IComparable)Minimum; 162var max = (IComparable)Maximum; 220Type comparableType = typeof(IComparable); 229IComparable min = (IComparable)(ParseLimitsInInvariantCulture 232IComparable max = (IComparable)(ParseLimitsInInvariantCulture
System.Data.Common (10)
System\Data\Common\ObjectStorage.cs (7)
53IComparable? icomparable = (valueNo1 as IComparable); 72if (valueNo1 is IComparable) 75return ((IComparable)valueNo1).CompareTo(value); 111if (valueNo1 is IComparable) 115return ((IComparable)valueNo1).CompareTo(valueNo2); 174return ((IComparable)valueNo1).CompareTo(valueNo2);
System\Data\Common\SqlUDTStorage.cs (3)
34_implementsIComparable = typeof(IComparable).IsAssignableFrom(type); 84IComparable comparable = (IComparable)_values[recordNo1];
System.Linq (8)
System\Linq\Max.cs (4)
307/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="System.IComparable" /> or <see cref="System.IComparable{T}" /> interface.</exception> 309/// <para>If type <typeparamref name="TSource" /> implements <see cref="System.IComparable{T}" />, the <see cref="Max{T}(IEnumerable{T})" /> method uses that implementation to compare values. Otherwise, if type <typeparamref name="TSource" /> implements <see cref="System.IComparable" />, that implementation is used to compare values.</para> 403/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="System.IComparable{TKey}" /> interface.</exception> 417/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System\Linq\Min.cs (4)
286/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="System.IComparable" /> or <see cref="System.IComparable{T}" /> interface.</exception> 288/// <para>If type <typeparamref name="TSource" /> implements <see cref="System.IComparable{T}" />, the <see cref="Min{T}(IEnumerable{T})" /> method uses that implementation to compare values. Otherwise, if type <typeparamref name="TSource" /> implements <see cref="System.IComparable" />, that implementation is used to compare values.</para> 382/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="System.IComparable{TKey}" /> interface.</exception> 396/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System.Linq.AsyncEnumerable (8)
System\Linq\MaxAsync.cs (2)
19/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{T}" /> interface (via the returned task).</exception> 21/// <para>If type <typeparamref name="TSource" /> implements <see cref="IComparable{T}" />, the <see cref="MaxAsync{TSource}(IAsyncEnumerable{TSource}, IComparer{TSource}?, CancellationToken)" /> method uses that implementation to compare values. Otherwise, if type <typeparamref name="TSource" /> implements <see cref="IComparable" />, that implementation is used to compare values.</para>
System\Linq\MaxByAsync.cs (2)
21/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 131/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System\Linq\MinAsync.cs (2)
19/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{T}" /> interface.</exception> 21/// <para>If type <typeparamref name="TSource" /> implements <see cref="IComparable{T}" />, the <see cref="MinAsync{TSource}(IAsyncEnumerable{TSource}, IComparer{TSource}?, CancellationToken)" /> method uses that implementation to compare values. Otherwise, if type <typeparamref name="TSource" /> implements <see cref="IComparable" />, that implementation is used to compare values.</para>
System\Linq\MinByAsync.cs (2)
21/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 131/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System.Linq.Queryable (7)
System\Linq\Queryable.cs (7)
1731/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="System.IComparable" /> or <see cref="System.IComparable{T}" /> interface.</exception> 1765/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 1788/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TSource}" /> interface.</exception> 1815/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 1882/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 1905/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TSource}" /> interface.</exception> 1932/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System.Private.CoreLib (26)
src\libraries\System.Private.CoreLib\src\System\Collections\Comparer.cs (2)
61if (a is IComparable ia) 64if (b is IComparable ib)
src\libraries\System.Private.CoreLib\src\System\Collections\CompatibleComparer.cs (1)
39if (a is IComparable ia)
src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (1)
546int IComparable.CompareTo(object? obj)
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
48/// <inheritdoc cref="IComparable.CompareTo(object)" />
src\libraries\System.Private.CoreLib\src\System\StringComparer.cs (1)
172if (x is IComparable ia)
src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (2)
1486/// <inheritdoc cref="IComparable.CompareTo" /> 1487int IComparable.CompareTo(object? obj)
src\libraries\System.Private.CoreLib\src\System\Tuple.cs (8)
138int IComparable.CompareTo(object? obj) 258int IComparable.CompareTo(object? obj) 383int IComparable.CompareTo(object? obj) 518int IComparable.CompareTo(object? obj) 663int IComparable.CompareTo(object? obj) 818int IComparable.CompareTo(object? obj) 983int IComparable.CompareTo(object? obj) 1163int IComparable.CompareTo(object? obj)
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
50/// <inheritdoc cref="IComparable.CompareTo(object)" />
src\libraries\System.Private.CoreLib\src\System\ValueTuple.cs (9)
60int IComparable.CompareTo(object? other) 317int IComparable.CompareTo(object? other) 508int IComparable.CompareTo(object? other) 699int IComparable.CompareTo(object? other) 906int IComparable.CompareTo(object? other) 1131int IComparable.CompareTo(object? other) 1374int IComparable.CompareTo(object? other) 1635int IComparable.CompareTo(object? other) 1920int IComparable.CompareTo(object? other)
System.Private.Xml (2)
System\Xml\Core\XmlTextReaderImplHelpers.cs (1)
680int IComparable.CompareTo(object? obj)
System\Xml\Xsl\IlGen\XmlILOptimizerVisitor.cs (1)
5458cmp = ((IComparable)litLeft).CompareTo(litRight);
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
267[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IComparable))]
System.Windows.Forms (2)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.RowComparer.cs (2)
90if (value1 is not IComparable && value2 is not IComparable)
System.Windows.Forms.Primitives.TestUtilities (4)
Extensions\AssertExtensions.cs (4)
311public static void GreaterThan<T>(T actual, T greaterThan, string userMessage = null) where T : IComparable 328public static void LessThan<T>(T actual, T lessThan, string userMessage = null) where T : IComparable 352public static void LessThanOrEqualTo<T>(T actual, T lessThanOrEqualTo, string userMessage = null) where T : IComparable 367public static void GreaterThanOrEqualTo<T>(T actual, T greaterThanOrEqualTo, string userMessage = null) where T : IComparable
System.Windows.Forms.Tests (1)
System\Windows\Forms\AxHost.ConnectionPointCookieTests.cs (1)
53[InlineData(typeof(IComparable))]
xunit.assert (11)
Comparers.cs (1)
47 where T : IComparable =>
RangeAsserts.cs (2)
37 where T : IComparable => 76 where T : IComparable =>
Sdk\AssertEqualityComparer.cs (2)
305 var comparable = x as IComparable;
Sdk\AssertHelper.cs (4)
511 var expectedComparable = expected as IComparable; 525 var actualComparable = actual as IComparable;
Sdk\AssertRangeComparer.cs (1)
26 where T : IComparable
Sdk\Exceptions\EquivalentException.cs (1)
142 /// typically during a call to <see cref="IComparable.CompareTo(object)"/></param>