Created
December 19, 2017 11:25
-
-
Save Kazuki-Kachi/40975529267987f92a6dc06a90987682 to your computer and use it in GitHub Desktop.
For func
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim i As Integer | |
' それVBならBuildできますよ? | |
Dim f As Func(Of Integer, Integer) = If(args.Any() AndAlso Integer.TryParse(args.First(), i), Function(x) x + i, Function(x) x) | |
' 左に型を明記する必要すらない | |
Dim f1 = If(args.Any() AndAlso Integer.TryParse(args.First(), i), Function(x As Integer) x + i, Function(x As Integer) x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment