Skip to content

Commit 05c406d

Browse files
committed
Var and T in Helper class.
1 parent 6008db8 commit 05c406d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • source/code/projects/GenericType/GenericType

source/code/projects/GenericType/GenericType/Helper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ public static T[] Reverse<T>(T[] arrayP)
1818
public static string Description<T>(T[] arrayP)
1919
{
2020
string returned = "";
21-
foreach (var element in arrayP)
21+
// Both works:
22+
// foreach (var element in arrayP)
23+
foreach (T element in arrayP)
2224
{
2325
returned += element + " ";
2426
}

0 commit comments

Comments
 (0)