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