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

Struct CellRelativeAddress

Represents a relative address between two cells.

Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public struct CellRelativeAddress

Constructors

CellRelativeAddress(CellAddress, CellAddress)

Initializes a new instance of the CellRelativeAddress struct from two cell addresses.

Declaration
public CellRelativeAddress(CellAddress target, CellAddress source)
Parameters
Type Name Description
CellAddress target

The target cell address.

CellAddress source

The source cell address.

CellRelativeAddress(int, int)

Initializes a new instance of the CellRelativeAddress struct with row and column offsets.

Declaration
public CellRelativeAddress(int row, int column)
Parameters
Type Name Description
int row

The row offset.

int column

The column offset.

Fields

Column

Gets the row offset.

Declaration
public readonly int Column
Field Value
Type Description
int

Row

Gets the row offset.

Declaration
public readonly int Row
Field Value
Type Description
int

Methods

Equals(object)

Determines whether this relative address equals an object.

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

The object to compare.

Returns
Type Description
bool

True if the object is a CellRelativeAddress with equal values; otherwise, false.

Overrides
ValueType.Equals(object)

GetHashCode()

Serves as the default hash function for CellRelativeAddress.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for the relative address.

Overrides
ValueType.GetHashCode()

ToString()

Returns a string representation of the relative address.

Declaration
public override string ToString()
Returns
Type Description
string

The string representation.

Overrides
ValueType.ToString()

Operators

operator +(CellRelativeAddress, CellRelativeAddress)

Adds two relative addresses together.

Declaration
public static CellRelativeAddress operator +(CellRelativeAddress a, CellRelativeAddress b)
Parameters
Type Name Description
CellRelativeAddress a

The first relative address.

CellRelativeAddress b

The second relative address.

Returns
Type Description
CellRelativeAddress

The combined relative address.

operator -(CellRelativeAddress, CellRelativeAddress)

Subtracts one relative address from another.

Declaration
public static CellRelativeAddress operator -(CellRelativeAddress a, CellRelativeAddress b)
Parameters
Type Name Description
CellRelativeAddress a

The minuend.

CellRelativeAddress b

The subtrahend.

Returns
Type Description
CellRelativeAddress

The resulting relative address.

Back to top

DR-IT Software documentation

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

Generated by DocFX