Table of Contents

Class UniqueTableInWhole

Namespace
SunamoCollectionsGeneric.Collections
Assembly
SunamoCollectionsGeneric.dll

Represents a unique table where each row contains all columns. Similar class with two dimension array is ValuesTableGrid. Can be: Every column of row unique, Every row of column unique, Every column as whole different, Every rows as whole different.

public class UniqueTableInWhole
Inheritance
UniqueTableInWhole
Inherited Members
Extension Methods

Constructors

UniqueTableInWhole(int, int)

Initializes a new instance with the specified dimensions

public UniqueTableInWhole(int columnCount, int rowCount)

Parameters

columnCount int

The number of columns in the table

rowCount int

The number of rows in the table

Fields

XBothColumnAndRowArgumentsInUniqueTableInWholeIsUniqueAsRowOrColumnWasFalse

Error message for when both column and row uniqueness arguments are false

public const string XBothColumnAndRowArgumentsInUniqueTableInWholeIsUniqueAsRowOrColumnWasFalse = "BothColumnAndRowArgumentsInUniqueTableInWholeIsUniqueAsRowOrColumnWasFalse"

Field Value

string

XDifferentCountInputElementsOfArrayInUniqueTableInWholeAddCells

Error message for when input elements count differs from expected column count

public const string XDifferentCountInputElementsOfArrayInUniqueTableInWholeAddCells = "DifferentCountInputElementsOfArrayInUniqueTableInWholeAddCells"

Field Value

string

Methods

AddCells(List<string>)

Adds a row of cells to the table

public void AddCells(List<string> cells)

Parameters

cells List<string>

The cells to add as a new row

IsUniqueAsRowsOrColumns(bool, bool)

Checks if the table is unique as rows or columns. If isColumnsUnique is true, verifies all columns in all rows are unique. If isRowsUnique is true, verifies all rows in all columns are unique.

public bool IsUniqueAsRowsOrColumns(bool isColumnsUnique, bool isRowsUnique)

Parameters

isColumnsUnique bool

Whether to check that each row has unique column values.

isRowsUnique bool

Whether to check that each column has unique row values.

Returns

bool

True if the table satisfies the specified uniqueness constraints.