Represents a range with a minimum and maximum value.
InheritanceSystem.Object
Namespace: Umbraco.Cms.Core.Models Assembly: Umbraco.Core.dll Syntaxpublic class Range<T> : IEquatable<Range<T>> where T : IComparable<T>
Type Parameters Name Description T
The type of the minimum and maximum values.
Properties View Source MaximumGets or sets the maximum value.
Declarationpublic T Maximum { get; set; }
Property Value Type Description T
The maximum value.
View Source MinimumGets or sets the minimum value.
Declarationpublic T Minimum { get; set; }
Property Value Type Description T
The minimum value.
Methods View Source ContainsRange(Range<T>)Determines whether this range contains the specified range.
Declarationpublic bool ContainsRange(Range<T> range)
Parameters Type Name Description Range<T> range
The range.
Returns Type Description System.Booleantrue
if this range contains the specified range; otherwise, false
.
Determines whether this range contains the specified value.
Declarationpublic bool ContainsValue(T value)
Parameters Type Name Description T value
The value.
Returns Type Description System.Booleantrue
if this range contains the specified value; otherwise, false
.
Determines whether the specified minimum
and maximum
values are equal to this instance values.
public bool Equals(T minimum, T maximum)
Parameters Type Name Description T minimum
The minimum value.
T maximumThe maximum value.
Returns Type Description System.Booleantrue
if the specified minimum
and maximum
values are equal to this instance values; otherwise, false
.
Determines whether the specified System.Object, is equal to this instance.
Declarationpublic override bool Equals(object obj)
Parameters Type Name Description System.Object obj
The System.Object to compare with this instance.
Returns Type Description System.Booleantrue
if the specified System.Object is equal to this instance; otherwise, false
.
Indicates whether the current object is equal to another object of the same type.
Declarationpublic bool Equals(Range<T> other)
Parameters Type Name Description Range<T> other
An object to compare with this object.
Returns Type Description System.Booleantrue if the current object is equal to the other
parameter; otherwise, false.
Returns a hash code for this instance.
Declarationpublic override int GetHashCode()
Returns Type Description System.Int32
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
View Source IsInsideRange(Range<T>)Determines whether this range is inside the specified range.
Declarationpublic bool IsInsideRange(Range<T> range)
Parameters Type Name Description Range<T> range
The range.
Returns Type Description System.Booleantrue
if this range is inside the specified range; otherwise, false
.
Determines whether this range is valid (the minimum value is lower than or equal to the maximum value).
Declaration Returns Type Description System.Booleantrue
if this range is valid; otherwise, false
.
Returns a System.String that represents this instance.
Declarationpublic override string ToString()
Returns Type Description System.String
A System.String that represents this instance.
View Source ToString(String, Nullable<IFormatProvider>)Returns a System.String that represents this instance.
Declarationpublic string ToString(string format, IFormatProvider? provider = null)
Parameters Type Name Description System.String format
A composite format string for the range values. Use {0} for the minimum and {1} for the maximum value.
System.Nullable<IFormatProvider> providerAn object that supplies culture-specific formatting information.
Returns Type Description System.StringA System.String that represents this instance.
View Source ToString(String, String, Nullable<IFormatProvider>)Returns a System.String that represents this instance.
Declarationpublic string ToString(string format, string formatRange, IFormatProvider? provider = null)
Parameters Type Name Description System.String format
A composite format string for a single value (minimum and maximum are equal). Use {0} for the minimum and {1} for the maximum value.
System.String formatRangeA composite format string for the range values. Use {0} for the minimum and {1} for the maximum value.
System.Nullable<IFormatProvider> providerAn object that supplies culture-specific formatting information.
Returns Type Description System.StringA System.String that represents this instance.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4