1 Dim first As Date
2 Dim year As Integer
3 Dim month As Integer
4
5 first = firstDay(year, month)
6
7 Function firstDay(intY As Integer, intM As Integer) As Date
8 Dim day As Date
9 day = New Datetime(intY, intM, 1)
10 Return day
11 End Function
Dim firstDay As Func(Of Integer, Integer, Date) = _
Function (intY As Integer, intM As Integer) As Date
Dim day As Date
day = New Datetime(intY, intM, 1)
Return day
End Function
' Dim year As Integer ' Invoke Codeの引数でテストしました
' Dim month As Integer
' Dim first As Date
first = firstDay(year, month)