KGy SOFT

RangeT Structure

KGy SOFT Core Libraries Help
Represents a range with lower and upper bounds.

Namespace:  KGySoft.CoreLibraries
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0-rc.1
Syntax

public struct Range<T> : IEquatable<Range<T>>
where T : Object, IComparable<T>

Type Parameters

T
The type of the range.

The RangeT type exposes the following members.

Constructors

  NameDescription
Public methodRangeT(T)
Initializes a new instance of the RangeT struct between the default value of T and the specified upperBound.
Public methodRangeT(T, T)
Initializes a new instance of the RangeT struct between the specified lowerBound and upperBound.
Top
Properties

  NameDescription
Public propertyLowerBound
Gets the lower bound of the range.
Public propertyUpperBound
Gets the upper bound of the range. Whether this is an exclusive or inclusive bound, it depends on the context the RangeT is used in.
Top
Methods

  NameDescription
Public methodDeconstruct
Deconstructs this RangeT instance.
Public methodEquals(Object)
Determines whether the specified Object is equal to this instance.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(RangeT)
Indicates whether the current RangeT instance is equal to another one specified in the other prameter.
Public methodGetHashCode
Returns a hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Gets the string representation of this RangeT instance.
(Overrides ValueTypeToString.)
Top
Operators

  NameDescription
Public operatorStatic memberEquality
Implements the equality check operator.
Public operatorStatic member(ValueTupleT, T to RangeT)
Performs an implicit conversion from ValueTupleT1, T2 to RangeT.
Public operatorStatic member(T to RangeT)
Performs an implicit conversion from T to RangeT using the provided value as upper bound.
Public operatorStatic memberInequality
Implements the inequality check operator.
Top
Extension Methods

  NameDescription
Public Extension MethodConvert(Type, CultureInfo)Overloaded.
Converts an Object specified in the obj parameter to the desired targetType.
See the Examples section of the generic ConvertTTarget(Object, CultureInfo) overload for an example.
(Defined by ObjectExtensions.)
Public Extension MethodCode exampleConvertTTarget(CultureInfo)Overloaded.
Converts an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions.)
Public Extension MethodIn (Defined by ObjectExtensions.)
Public Extension MethodTryConvert(Type, Object)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvert(Type, CultureInfo, Object)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvertTTarget(TTarget)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvertTTarget(CultureInfo, TTarget)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions.)
Top
See Also

Reference