Class NumberFormat
Namespace: FastReport.Olap.Format
Assembly: FastCube.Core.dll
Defines how numeric values are formatted and displayed.
public class NumberFormat : FormatBase
Inheritance
object ← MarshalByRefObject ← Component ← FormatBase ← NumberFormat
Inherited Members
FormatBase.Name, FormatBase.Clone(), FormatBase.FormatValue(object), FormatBase.Load(XmlItem), FormatBase.Save(XmlItem)
Constructors
NumberFormat()
Initializes a new instance of the NumberFormat class with default settings.
public NumberFormat()
Properties
DecimalDigits
Gets or sets the number of decimal places to use in numeric values.
public int DecimalDigits { get; set; }
Property Value
DecimalSeparator
Gets or sets the string to use as the decimal separator in numeric values.
public string DecimalSeparator { get; set; }
Property Value
GroupSeparator
Gets or sets the string that separates groups of digits to the left of the decimal in numeric values.
public string GroupSeparator { get; set; }
Property Value
NegativePattern
Gets or sets the format pattern for negative numeric values.
public int NegativePattern { get; set; }
Property Value
Remarks
This property can have one of the values in the following table. The symbol n is a number.
Value | Associated Pattern |
---|---|
0 | (n) |
1 | -n |
2 | - n |
3 | n- |
4 | n - |
UseLocale
Gets or sets a value that determines whether to use system locale settings to format a value.
public bool UseLocale { get; set; }
Property Value
Methods
Clone()
Creates exact copy of this format.
public override FormatBase Clone()
Returns
The copy of this format.
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
obj
object
The object to compare with the current object.
Returns
true if the specified object is equal to the current object; otherwise, false.
FormatValue(object)
Formats the specified value.
public override string FormatValue(object value)
Parameters
value
object
The value to format.
Returns
The string that represents the formatted value.
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
A hash code for the current object.
Load(XmlItem)
Loads format from XML
public override void Load(XmlItem item)
Parameters
item
XmlItem
Save(XmlItem)
Saves format to XML
public override void Save(XmlItem item)
Parameters
item
XmlItem