T
The IEnumerable object to iterate over.
Leadtools.Dicom.AddIn Requires Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
Generic ForEach Method
See Also 
Leadtools.Dicom.AddIn Namespace > Extensions Class : Generic ForEach 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 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

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