2
2
3
3
namespace Algorithms . Common
4
4
{
5
- public static class Comparers
6
- {
5
+ public static class Comparers
6
+ {
7
7
/// <summary>
8
8
/// Determines if a specific value is a number.
9
9
/// </summary>
@@ -27,44 +27,44 @@ public static bool IsNumber<T>(this T value)
27
27
}
28
28
29
29
30
- /// <summary>
31
- /// Determines if firstValue is equals to the specified secondValue.
32
- /// </summary>
33
- /// <returns><c>true</c> if firstValue is equals to the specified secondValue; otherwise, <c>false</c>.</returns>
34
- /// <param name="firstValue">The first value.</param>
35
- /// <param name="secondValue">The second value.</param>
36
- /// <typeparam name="T">The Type of values.</typeparam>
37
- public static bool IsEqualTo < T > ( this T firstValue , T secondValue ) where T : IComparable < T >
38
- {
39
- return firstValue . Equals ( secondValue ) ;
40
- }
30
+ /// <summary>
31
+ /// Determines if firstValue is equals to the specified secondValue.
32
+ /// </summary>
33
+ /// <returns><c>true</c> if firstValue is equals to the specified secondValue; otherwise, <c>false</c>.</returns>
34
+ /// <param name="firstValue">The first value.</param>
35
+ /// <param name="secondValue">The second value.</param>
36
+ /// <typeparam name="T">The Type of values.</typeparam>
37
+ public static bool IsEqualTo < T > ( this T firstValue , T secondValue ) where T : IComparable < T >
38
+ {
39
+ return firstValue . Equals ( secondValue ) ;
40
+ }
41
41
42
42
43
- /// <summary>
44
- /// Determines if thisValue is greater than the specified otherValue.
45
- /// </summary>
46
- /// <returns><c>true</c> if thisValue is greater than the specified otherValue; otherwise, <c>false</c>.</returns>
47
- /// <param name="firstValue">The first value.</param>
48
- /// <param name="secondValue">The second value.</param>
49
- /// <typeparam name="T">The Type of values.</typeparam>
50
- public static bool IsGreaterThan < T > ( this T firstValue , T secondValue ) where T : IComparable < T >
51
- {
52
- return firstValue . CompareTo ( secondValue ) > 0 ;
53
- }
43
+ /// <summary>
44
+ /// Determines if thisValue is greater than the specified otherValue.
45
+ /// </summary>
46
+ /// <returns><c>true</c> if thisValue is greater than the specified otherValue; otherwise, <c>false</c>.</returns>
47
+ /// <param name="firstValue">The first value.</param>
48
+ /// <param name="secondValue">The second value.</param>
49
+ /// <typeparam name="T">The Type of values.</typeparam>
50
+ public static bool IsGreaterThan < T > ( this T firstValue , T secondValue ) where T : IComparable < T >
51
+ {
52
+ return firstValue . CompareTo ( secondValue ) > 0 ;
53
+ }
54
54
55
55
56
- /// <summary>
57
- /// Determines if thisValue is less than the specified otherValue.
58
- /// </summary>
59
- /// <returns><c>true</c> if thisValue is less than the specified otherValue; otherwise, <c>false</c>.</returns>
60
- /// <param name="firstValue">The first value.</param>
61
- /// <param name="secondValue">The second value.</param>
62
- /// <typeparam name="T">The Type of values.</typeparam>
63
- public static bool IsLessThan < T > ( this T firstValue , T secondValue ) where T : IComparable < T >
64
- {
65
- return firstValue . CompareTo ( secondValue ) < 0 ;
66
- }
56
+ /// <summary>
57
+ /// Determines if thisValue is less than the specified otherValue.
58
+ /// </summary>
59
+ /// <returns><c>true</c> if thisValue is less than the specified otherValue; otherwise, <c>false</c>.</returns>
60
+ /// <param name="firstValue">The first value.</param>
61
+ /// <param name="secondValue">The second value.</param>
62
+ /// <typeparam name="T">The Type of values.</typeparam>
63
+ public static bool IsLessThan < T > ( this T firstValue , T secondValue ) where T : IComparable < T >
64
+ {
65
+ return firstValue . CompareTo ( secondValue ) < 0 ;
66
+ }
67
67
68
- }
68
+ }
69
69
70
70
}
0 commit comments