NanoXLSX.Core 3.0.0-rc.3
Loading...
Searching...
No Matches
NanoXLSX.Address Struct Reference

Struct representing the cell address as column and row (zero based). More...

Inheritance diagram for NanoXLSX.Address:

Public Member Functions

 Address (int column, int row)
 Constructor with row and column as arguments. The referencing type of the address is default (e.g. 'C20').
 Address (int column, int row, Cell.AddressType type)
 Constructor with row and column as arguments. All referencing modifiers ($) are ignored and only the defined referencing type considered.
 Address (string address)
 Constructor with address as string. If no referencing modifiers ($) are defined, the address is of referencing type default (e.g. 'C23').
 Address (string address, Cell.AddressType type)
 Constructor with address as string. All referencing modifiers ($) are ignored and only the defined referencing type considered.
string GetAddress ()
 Returns the combined Address.
string GetColumn ()
 Gets the column address (A - XFD).
override string ToString ()
 Overwritten ToString method.
bool Equals (Address other)
 Compares two addresses whether they are equal.
override bool Equals (object obj)
 Compares two objects whether they are addresses and equal.
override int GetHashCode ()
 Gets the hash code based on the string representation of the address.
int CompareTo (Address other)
 Compares two addresses using the column and row numbers.

Static Public Member Functions

static bool operator== (Address address1, Address address2)
 Determines whether two Address instances are equal.
static bool operator!= (Address address1, Address address2)
 Determines whether two Address instances are not equal.
static bool operator< (Address left, Address right)
 Determines whether one specified Address is less/smaller than another specified Address.
static bool operator<= (Address left, Address right)
 Determines whether one specified Address is less/smaller or equal than another specified Address.
static bool operator> (Address left, Address right)
 Determines whether one specified Address is greater/larger than another specified Address.
static bool operator>= (Address left, Address right)
 Determines whether one specified Address is greater/larger or equal than another specified Address.

Properties

int Column [get]
 Column number (zero based).
int Row [get]
 Row number (zero based).
Cell.AddressType Type [get]
 Referencing type of the address.

Detailed Description

Struct representing the cell address as column and row (zero based).

Definition at line 15 of file Address.cs.

Constructor & Destructor Documentation

◆ Address() [1/4]

NanoXLSX.Address.Address ( int column,
int row )

Constructor with row and column as arguments. The referencing type of the address is default (e.g. 'C20').

Parameters
columnColumn number (zero based)
rowRow number (zero based)

Definition at line 40 of file Address.cs.

◆ Address() [2/4]

NanoXLSX.Address.Address ( int column,
int row,
Cell.AddressType type )

Constructor with row and column as arguments. All referencing modifiers ($) are ignored and only the defined referencing type considered.

Parameters
columnColumn number (zero based)
rowRow number (zero based)
typeReferencing type of the address

Definition at line 51 of file Address.cs.

◆ Address() [3/4]

NanoXLSX.Address.Address ( string address)

Constructor with address as string. If no referencing modifiers ($) are defined, the address is of referencing type default (e.g. 'C23').

Parameters
addressAddress string (e.g. '$B$12')

Definition at line 64 of file Address.cs.

◆ Address() [4/4]

NanoXLSX.Address.Address ( string address,
Cell.AddressType type )

Constructor with address as string. All referencing modifiers ($) are ignored and only the defined referencing type considered.

Parameters
addressAddress string (e.g. 'B12')
typeReferencing type of the address

Definition at line 74 of file Address.cs.

Member Function Documentation

◆ CompareTo()

int NanoXLSX.Address.CompareTo ( Address other)

Compares two addresses using the column and row numbers.

Parameters
otherOther address
Returns
-1 if the other address is greater, 0 if equal and 1 if smaller

Definition at line 174 of file Address.cs.

◆ Equals() [1/2]

bool NanoXLSX.Address.Equals ( Address other)

Compares two addresses whether they are equal.

Parameters
otherOther address
Returns
True if equal

Definition at line 112 of file Address.cs.

◆ Equals() [2/2]

override bool NanoXLSX.Address.Equals ( object obj)

Compares two objects whether they are addresses and equal.

Parameters
objOther address
Returns
True if not null, of the same type and equal

Definition at line 125 of file Address.cs.

◆ GetAddress()

string NanoXLSX.Address.GetAddress ( )

Returns the combined Address.

Returns
Address as string in the format A1 - XFD1048576

Definition at line 84 of file Address.cs.

◆ GetColumn()

string NanoXLSX.Address.GetColumn ( )

Gets the column address (A - XFD).

Returns
Column address as letter(s)

Definition at line 93 of file Address.cs.

◆ GetHashCode()

override int NanoXLSX.Address.GetHashCode ( )

Gets the hash code based on the string representation of the address.

Returns
Hash code of the address

Definition at line 138 of file Address.cs.

◆ operator!=()

bool NanoXLSX.Address.operator!= ( Address address1,
Address address2 )
static

Determines whether two Address instances are not equal.

Remarks
This operator uses the Address.Equals(Address) method to determine equality.
Parameters
address1The first Address instance to compare.
address2The second Address instance to compare.
Returns
true if the two Address instances are not equal; otherwise, false.

Definition at line 164 of file Address.cs.

◆ operator<()

bool NanoXLSX.Address.operator< ( Address left,
Address right )
static

Determines whether one specified Address is less/smaller than another specified Address.

Parameters
leftLeft address
rightRight address
Returns
True, if the left address is less/smaller than the right one

Definition at line 187 of file Address.cs.

◆ operator<=()

bool NanoXLSX.Address.operator<= ( Address left,
Address right )
static

Determines whether one specified Address is less/smaller or equal than another specified Address.

Parameters
leftLeft address
rightRight address
Returns
True, if the left address is less/smaller than, or equal to the right one

Definition at line 198 of file Address.cs.

◆ operator==()

bool NanoXLSX.Address.operator== ( Address address1,
Address address2 )
static

Determines whether two Address instances are equal.

Parameters
address1The first Address instance to compare.
address2The second Address instance to compare.
Returns
true if the specified Address instances are equal; otherwise, false.

Definition at line 151 of file Address.cs.

◆ operator>()

bool NanoXLSX.Address.operator> ( Address left,
Address right )
static

Determines whether one specified Address is greater/larger than another specified Address.

Parameters
leftLeft address
rightRight address
Returns
True, if the left address is greater/larger than the right one

Definition at line 209 of file Address.cs.

◆ operator>=()

bool NanoXLSX.Address.operator>= ( Address left,
Address right )
static

Determines whether one specified Address is greater/larger or equal than another specified Address.

Parameters
leftLeft address
rightRight address
Returns
True, if the left address is greater/larger than, or equal to the right one

Definition at line 220 of file Address.cs.

◆ ToString()

override string NanoXLSX.Address.ToString ( )

Overwritten ToString method.

Returns
Returns the cell address (e.g. 'A15')

Definition at line 102 of file Address.cs.

Property Documentation

◆ Column

int NanoXLSX.Address.Column
get

Column number (zero based).

Definition at line 24 of file Address.cs.

◆ Row

int NanoXLSX.Address.Row
get

Row number (zero based).

Definition at line 28 of file Address.cs.

◆ Type

Cell.AddressType NanoXLSX.Address.Type
get

Referencing type of the address.

Definition at line 33 of file Address.cs.


The documentation for this struct was generated from the following file: