Table of Contents

Struct NoxCellRange

Namespace
Nox.Grid
Assembly
Nox.Grid.dll

A rectangular cell range (inclusive). Normalized on creation so that top/left are the smaller values.

public readonly struct NoxCellRange : IEquatable<NoxCellRange>
Implements
Inherited Members

Constructors

NoxCellRange(int, int, int, int)

Creates a range from two corner cells (in any order).

public NoxCellRange(int row1, int column1, int row2, int column2)

Parameters

row1 int
column1 int
row2 int
column2 int

Properties

Bottom

Last row of the range.

public int Bottom { get; }

Property Value

int

ColumnCount

Number of columns in the range.

public int ColumnCount { get; }

Property Value

int

Left

First column of the range.

public int Left { get; }

Property Value

int

Right

Last column of the range.

public int Right { get; }

Property Value

int

RowCount

Number of rows in the range.

public int RowCount { get; }

Property Value

int

Top

First row of the range.

public int Top { get; }

Property Value

int

Methods

Contains(int, int)

Whether the cell is inside the range.

public bool Contains(int row, int column)

Parameters

row int
column int

Returns

bool

ContainsRow(int)

Whether the row is inside the range.

public bool ContainsRow(int row)

Parameters

row int

Returns

bool

Equals(NoxCellRange)

Whether the two ranges cover the same cells.

public bool Equals(NoxCellRange other)

Parameters

other NoxCellRange

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(NoxCellRange, NoxCellRange)

Whether the two values are equal.

public static bool operator ==(NoxCellRange a, NoxCellRange b)

Parameters

a NoxCellRange
b NoxCellRange

Returns

bool

operator !=(NoxCellRange, NoxCellRange)

Whether the two values differ.

public static bool operator !=(NoxCellRange a, NoxCellRange b)

Parameters

a NoxCellRange
b NoxCellRange

Returns

bool