Skip to content

Commit 2c91972

Browse files
delegates cleanup
1 parent 2ef63c1 commit 2c91972

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1_CS/Delegates/GetAStringDemo/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
int x = 40;
2-
GetAString firstStringMethod = new GetAString(x.ToString);
2+
GetAString firstStringMethod = new(x.ToString);
33
Console.WriteLine($"String is {firstStringMethod()}");
44
// With firstStringMethod initialized to x.ToString(),
55
// the above statement is equivalent to saying

0 commit comments

Comments
 (0)