- source
- The source enumeration
- action
- The action to perform.
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.
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7