Table of Contents

Method SetValue

Namespace
Gamelogic.Grids2
Assembly
Gamelogic.Grids2.dll

SetValue<TPoint, TCell>(IGrid<TPoint, TCell>, TPoint, TCell)

Sets the value of a grid at a specified point.

public static void SetValue<TPoint, TCell>(this IGrid<TPoint, TCell> grid, TPoint point, TCell value)

Parameters

grid IGrid<TPoint, TCell>

The grid in which to set the value.

point TPoint

The point at which to set the value.

value TCell

The value to set at the given point.

Type Parameters

TPoint

The point type of the grid.

TCell

The cell type of the grid.

Remarks

Grid values are also referred to as cells.

This method is equivalent to setting the value using the index operator: grid[point] = value;, but is often more convenient to use in lambda expressions.