• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class Format

Represents the format of a value.

Inheritance
object
Format
DateTimeFormat
FractionFormat
GeneralFormat
NumberFormat
TextFormat
Inherited Members
object.ToString()
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Presentation.Office
Assembly: DRIT.Presentation.dll
Syntax
public abstract class Format

Constructors

Format(string)

Initializes a new instance of the format class.

Declaration
protected Format(string code)
Parameters
Type Name Description
string code

The code to convert or assign.

Fields

_code

Gets or sets the code text.

Declaration
protected string _code
Field Value
Type Description
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
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
object obj

The object to compare with this value.

Returns
Type Description
bool

true if the operation succeeds; otherwise, false.

Equals(object)

Determines whether this value matches the supplied value.

Declaration
public override sealed bool Equals(object obj)
Parameters
Type Name Description
object obj

The object to compare with this value.

Returns
Type Description
bool

true if the operation succeeds; otherwise, false.

Overrides
object.Equals(object)

GetColor(object)

Returns the codor used to display a value. If no

Declaration
public DrawingColor GetColor(object value)
Parameters
Type Name Description
object value

The value supplied to this operation.

Returns
Type Description
DrawingColor

The get color value produced by the operation.

GetHashCode()

Returns the hash code for this value.

Declaration
public override sealed int GetHashCode()
Returns
Type Description
int

The get hash code value produced by the operation.

Overrides
object.GetHashCode()

Parse(string)

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
Type Description
Format

The parse value produced by the operation.

Exceptions
Type Condition
ArgumentNullException
NotSupportedException

Operators

operator >(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

The a supplied to this operation.

Format b

The b supplied to this operation.

Returns
Type Description
bool

The operator > value produced by the operation.

operator <(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

The a supplied to this operation.

Format b

The b supplied to this operation.

Returns
Type Description
bool

The result of comparing the two formats.

Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX