ArgumentGuardHasSize Method |
Throws if collection has not the expected number of elements.
Namespace:
KSPDev.ProcessingUtils
Assembly:
KSPDev_Utils.2.3 (in KSPDev_Utils.2.3.dll) Version: 2.3 for KSP v1
Syntaxpublic static void HasSize(
IList arg,
string argName,
int size,
string message = null,
Object context = null
)
Request Example
View SourceParameters
- arg
- Type: System.CollectionsIList
The argument value to check. - argName
- Type: SystemString
The argument name. - size
- Type: SystemInt32
The expected collection size. - message (Optional)
- Type: SystemString
An optional message to present in the error. - context (Optional)
- Type: SystemObject
The optional "owner" object.
ExceptionsException | Condition |
---|
ArgumentOutOfRangeException |
If the value has different number of elements.
|
See Also