Click or drag to resize

GuardHasAtLeastNElementsT Method (IReadOnlyListT, Int32, String, String)

[This is preliminary documentation and is subject to change.]

Checks if items has at least count number of items in its collection

Namespace:  CSInfrastructure.CodeContracts
Assembly:  CSInfrastructure (in CSInfrastructure.dll) Version: 1.13.0+Branch.master.Sha.d583fc64569355d188a9c0818d257b6d0d3e1339
Syntax
C#
public static IReadOnlyList<T> HasAtLeastNElements<T>(
	IReadOnlyList<T> items,
	int count,
	string paramName,
	string message = null
)

Parameters

items
Type: System.Collections.GenericIReadOnlyListT
The collection to check
count
Type: SystemInt32
The minimum amount of items that should be present in the collection
paramName
Type: SystemString
The name of the parameter being checked
message (Optional)
Type: SystemString
A custom message for the exception

Type Parameters

T
The type of items in the collection

Return Value

Type: IReadOnlyListT
The collection being checked
Exceptions
ExceptionCondition
ArgumentExceptionThrown when items has less then count items in its collection
See Also