Class DoubleRanges
Represents a collection of ranges for double values, with parsing support from string representations.
public class DoubleRanges : Ranges<double>, IFormattable, IEquatable<Ranges<double>>, ISubtractionOperators<Ranges<double>, Ranges<double>, Ranges<double>>, IEqualityOperators<Ranges<double>, Ranges<double>, bool>
- Inheritance
-
DoubleRanges
- Implements
- Inherited Members
- Extension Methods
Constructors
DoubleRanges()
Initializes a new instance of the DoubleRanges class with no ranges.
public DoubleRanges()
DoubleRanges(IEnumerable<IRange<double>>)
Initializes a new instance of the DoubleRanges class with interface-based ranges.
public DoubleRanges(IEnumerable<IRange<double>> ranges)
Parameters
rangesIEnumerable<IRange<double>>The ranges to include in the collection.
DoubleRanges(IEnumerable<Range<double>>)
Initializes a new instance of the DoubleRanges class with ranges provided as an enumerable collection.
public DoubleRanges(IEnumerable<Range<double>> ranges)
Parameters
rangesIEnumerable<Range<double>>The ranges to include in the collection.
DoubleRanges(Ranges<double>)
Initializes a new instance of the DoubleRanges class by copying an existing set of ranges.
public DoubleRanges(Ranges<double> ranges)
Parameters
DoubleRanges(params Range<double>[])
Initializes a new instance of the DoubleRanges class with the specified ranges.
public DoubleRanges(params Range<double>[] ranges)
Parameters
Methods
Add(string)
Adds ranges to the collection by parsing them from a string using the current culture.
public void Add(string ranges)
Parameters
rangesstringThe string representation of the ranges to add.
Add(string, CultureInfo)
Adds ranges to the collection by parsing them from a string using a specified culture.
public void Add(string ranges, CultureInfo cultureInfo)
Parameters
rangesstringThe string representation of the ranges to add.
cultureInfoCultureInfoThe culture information to use for parsing.
Add(string, NumberFormatInfo)
Adds ranges to the collection by parsing them from a string using a specified number format.
public void Add(string ranges, NumberFormatInfo formatInfo)
Parameters
rangesstringThe string representation of the ranges to add.
formatInfoNumberFormatInfoThe number format information to use for parsing.
InnerParse(string, NumberFormatInfo)
Helper method to parse ranges from a string using specified number format information.
protected static IEnumerable<IRange<double>> InnerParse(string range, NumberFormatInfo formatInfo)
Parameters
rangestringThe string representation of the ranges.
formatInfoNumberFormatInfoThe number format information to use for parsing.
Returns
- IEnumerable<IRange<double>>
An enumerable collection of Range<double> objects parsed from the string.
Parse(string)
Parses a string representation of ranges into a DoubleRanges object using the current culture.
public static DoubleRanges Parse(string range)
Parameters
rangestringThe string representation of the ranges.
Returns
- DoubleRanges
A DoubleRanges object containing the parsed ranges.
Parse(string, CultureInfo)
Parses a string representation of ranges into a DoubleRanges object using a specified culture.
public static DoubleRanges Parse(string range, CultureInfo cultureInfo)
Parameters
rangestringThe string representation of the ranges.
cultureInfoCultureInfoThe culture information to use for parsing.
Returns
- DoubleRanges
A DoubleRanges object containing the parsed ranges.
Parse(string, NumberFormatInfo)
Parses a string representation of ranges into a DoubleRanges object using a specified number format.
public static DoubleRanges Parse(string range, NumberFormatInfo formatInfo)
Parameters
rangestringThe string representation of the ranges.
formatInfoNumberFormatInfoThe number format information to use for parsing.
Returns
- DoubleRanges
A DoubleRanges object containing the parsed ranges.