T
The IEnumerable object to iterate over.
LEADTOOLS Medical (Leadtools.Dicom.AddIn assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
ForEach<T> Method
See Also 
Leadtools.Dicom.AddIn Namespace > Extensions Class : ForEach<T> Method



source
The source enumeration
action
The action to perform.
source
The source enumeration
action
The action to perform.
Extenstion method provides a foreach like wrapper for IEnumerable.

Syntax

Visual Basic (Declaration) 
<ExtensionAttribute()>
Public Shared Sub ForEach(Of T)( _
   ByVal source As IEnumerable(Of T), _
   ByVal action As Action(Of T) _
) 
Visual Basic (Usage)Copy Code
Dim source As IEnumerable(Of T)
Dim action As Action(Of T)
 
Extensions.ForEach(Of T)(source, action)
C# 
[ExtensionAttribute()]
public static void ForEach<T>( 
   IEnumerable<T> source,
   Action<T> action
)
C++/CLI 
[ExtensionAttribute()]
public:
static void ForEachgeneric<typename T>
( 
   IEnumerable<T^>^ source,
   Action<T^>^ action
) 

Parameters

source
The source enumeration
action
The action to perform.

Type Parameters

T
The IEnumerable object to iterate over.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

Leadtools.Dicom.AddIn requires a Medical toolkit server license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features