Sub Swap(Of T)(ByRef a As T, ByRef b As T) Dim temp = a a = b b = temp End Sub