Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AssertUtils.ArgumentHasLength(ICollection, String, String) Method

Checks the value of the supplied ICollectionargument and throws an ArgumentNullException if it is a null reference (Nothing in Visual Basic) or contains no elements.

[Visual Basic]
Public Overloads Shared Sub ArgumentHasLength( _
   ByVal argument As ICollection, _
   ByVal name As String, _
   ByVal message As String _
)
[C#]
public static void ArgumentHasLength(
   ICollection argument,
   string name,
   string message
);

Parameters

argument
The array or collection to check.
name
The argument name.
message
An arbitrary message that will be passed to any thrown ArgumentNullException.

Exceptions

Exception Type Condition
ArgumentNullException If the supplied argument is a null reference (Nothing in Visual Basic) or contains no elements.

See Also

AssertUtils Class | Spring.Util Namespace | AssertUtils.ArgumentHasLength Overload List