- 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 |
---|---|
|
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 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family