Click or drag to resize

GridExtensionsApplyTCell, TPoint Method

Applies the given action to all cells in the grid.

Namespace:  Gamelogic.Grids
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
[VersionAttribute(1, 10, 0)]
public static void Apply<TCell, TPoint>(
	this IGrid<TCell, TPoint> grid,
	Action<TCell> action
)
where TPoint : Object, IGridPoint<TPoint>

Parameters

grid
Type: Gamelogic.GridsIGridTCell, TPoint
action
Type: SystemActionTCell

Type Parameters

TCell
TPoint

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IGridTCell, TPoint. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Examples
grid.Apply(cell => cell.Color = Color.red);
See Also