Cuemon .NET Framework
While<TSource>(TSource,Doer<Boolean>,Act<TSource>) Method

The type of the source in the encapsulated while-loop.
The object being iterated in the encapsulated while-loop by the condition delegate.
The condition delegate of the while-loop that is invoked once per iteration and is a member of source.
The delegate that is invoked once per iteration.
Provides a generic way of executing a while-loop while providing ways to encapsulate and re-use existing code.
Syntax
'Declaration
 
Public Overloads Shared Sub While(Of TSource As Class)( _
   ByVal source As TSource, _
   ByVal condition As Cuemon.Doer(Of Boolean), _
   ByVal method As Cuemon.Act(Of TSource) _
) 
public static void While<TSource>( 
   TSource source,
   Cuemon.Doer<bool> condition,
   Cuemon.Act<TSource> method
)
where TSource: class

Parameters

source
The object being iterated in the encapsulated while-loop by the condition delegate.
condition
The condition delegate of the while-loop that is invoked once per iteration and is a member of source.
method
The delegate that is invoked once per iteration.

Type Parameters

TSource
The type of the source in the encapsulated while-loop.
Exceptions
ExceptionDescription
System.ArgumentNullExceptioncondition is null -or- method is null. condition delegate does not target an instance method on source
TypeArgumentExceptionsource does not match the source of the condition delegate target.
Requirements

Target Platforms: Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

LoopUtility Class
LoopUtility Members
Overload List

 

 


| Cuemon is licensed under a The MIT License (MIT)



© 2009-2015 Weubphoria. All Rights Reserved.

Documentation made easy with Document! X by Innovasys

Send Feedback