Imports System.Runtime.CompilerServices Module IEnumerableEx Function SetValue(Of T)(ByVal items As IEnumerable(Of T), ByVal updateMethod As Action(Of T)) As IEnumerable(Of T) For Each item As T In items updateMethod(item) Next Return items End Function End Module