Class Format
Represents the format of a value.
Assembly: DRIT.Spreadsheet.dll
public abstract class Format
Constructors
Initializes a new Format for the supplied workbook data.
Declaration
protected Format(string code)
Parameters
| Type |
Name |
Description |
| string |
code |
|
Fields
Exposes the code associated with Format.
Declaration
Field Value
| Type |
Description |
| string |
The code returned by the operation.
|
Properties
Get the category of the format
Declaration
public abstract FormatCategory Category { get; }
Property Value
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
Declaration
public string FormatCode { get; }
Property Value
Methods
Indicates whether an object can be formatted by the current format
Declaration
public abstract bool CanFormat(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Exposes the equals associated with Format.
Declaration
public override sealed bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
The obj used by the operation.
|
Returns
| Type |
Description |
| bool |
The equals returned by the operation.
|
Overrides
Returns the codor used to display a value. If no
Declaration
public DrawingColor GetColor(object value)
Parameters
| Type |
Name |
Description |
| object |
value |
|
Returns
Retrieves the requested hash code from the Format.
Declaration
public override sealed int GetHashCode()
Returns
| Type |
Description |
| int |
The get hash code returned by the operation.
|
Overrides
Converts a string to a format.
Declaration
public static Format Parse(string formatCode)
Parameters
| Type |
Name |
Description |
| string |
formatCode |
A string containing the code of the format to convert
|
Returns
Exceptions
Operators
SJE 22-07-2013 comparison operators between formats
Declaration
public static bool operator >(Format a, Format b)
Parameters
Returns
Implicitly converts a format code string to a Format
instance, allowing cell.Format = "#,##0.00" syntax.
Declaration
public static implicit operator Format(string formatCode)
Parameters
| Type |
Name |
Description |
| string |
formatCode |
The format code string.
|
Returns
SJE 22-07-2013 comparison operators between formats
Declaration
public static bool operator <(Format a, Format b)
Parameters
Returns