Click or drag to resize

RankedSetTReplace Method (T, Boolean)

Replace an item or optionally add it if missing.

Namespace:  Kaos.Collections
Assembly:  KaosCollections (in KaosCollections.dll) Version: 4.2.0.0
Syntax
C#
public bool Replace(
	T item,
	bool addIfMissing
)

Parameters

item
Type: T
The replacement or new item.
addIfMissing
Type: SystemBoolean
true to add item if not already present.

Return Value

Type: Boolean
true if item is replaced; otherwise false.
Remarks
This operation is an optimized alternative to performing the implicit operations separately.
See Also