Table of Contents

Class CustomFormat

Namespace: FastReport.Olap.Format
Assembly: FastCube.Core.dll

Represents a format that uses the Format string to display values.

public class CustomFormat : FormatBase

Inheritance

objectMarshalByRefObjectComponentFormatBaseCustomFormat

Derived

DateFormat, TimeFormat

Inherited Members

FormatBase.Name, FormatBase.Clone(), FormatBase.FormatValue(object), FormatBase.Load(XmlItem), FormatBase.Save(XmlItem)

Constructors

CustomFormat()

Initializes a new instance of the CustomFormat class with default settings.

public CustomFormat()

Properties

DefaultFormatValue

Gets or sets default value for this format.

[Browsable(false)]
public string DefaultFormatValue { get; set; }

Property Value

string

Format

Gets or sets a format string.

public virtual string Format { get; set; }

Property Value

string

Remarks

Default format is "G". For example, if you want to format a date, use the following format string: "MM/dd/yyyy". See the System.String.Format method for list of possible format strings.

Methods

Clone()

Creates exact copy of this format.

public override FormatBase Clone()

Returns

FormatBase

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

bool

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

string

The string that represents the formatted value.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

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