Show / Hide Table of Contents

Class Format

Represents the format of a value.

Inheritance
System.Object
Format
DateTimeFormat
FractionFormat
GeneralFormat
NumberFormat
TextFormat
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public abstract class Format : object

Constructors

Format(String)

Declaration
protected Format(string code)
Parameters
Type Name Description
System.String code

Fields

_code

Declaration
protected string _code
Field Value
Type Description
System.String

Properties

Category

Get the category of the format

Declaration
public abstract FormatCategory Category { get; }
Property Value
Type Description
FormatCategory

Code

Get the code of the format. The code is a string representation of the format used to serialize to file.

Declaration
public string Code { get; }
Property Value
Type Description
System.String

Methods

CanFormat(Object)

Indicates whether an object can be formatted by the current format

Declaration
public abstract bool CanFormat(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean

Equals(Object)

Declaration
public override sealed bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean

GetColor(Object)

Returns the codor used to display a value. If no

Declaration
public DrawingColor GetColor(object value)
Parameters
Type Name Description
System.Object value
Returns
Type Description
DrawingColor

GetHashCode()

Declaration
public override sealed int GetHashCode()
Returns
Type Description
System.Int32

Parse(String)

Converts a string to a format.

Declaration
public static Format Parse(string formatCode)
Parameters
Type Name Description
System.String formatCode

A string containing the code of the format to convert

Returns
Type Description
Format

Operators

GreaterThan(Format, Format)

SJE 22-07-2013 comparison operators between formats

Declaration
public static bool operator>(Format a, Format b)
Parameters
Type Name Description
Format a
Format b
Returns
Type Description
System.Boolean

LessThan(Format, Format)

SJE 22-07-2013 comparison operators between formats

Declaration
public static bool operator <(Format a, Format b)
Parameters
Type Name Description
Format a
Format b
Returns
Type Description
System.Boolean
Back to top Generated by DocFX