請問這段VB改成C#.NET 怎麼改?

If Label19.Caption = "" Then datTemp = DTPicker2.Value If (Year(datTemp) - 2000) < 10 Then strYear = "0" + CStr(Year(datTemp) - 2000) Else strYear = CStr(Year(datTemp)) ... show more If Label19.Caption = "" Then

datTemp = DTPicker2.Value

If (Year(datTemp) - 2000) < 10 Then
strYear = "0" + CStr(Year(datTemp) - 2000)
Else
strYear = CStr(Year(datTemp))
End If

If Month(datTemp) < 10 Then
strMonth = "0" + CStr(Month(datTemp))
Else
strMonth = CStr(Month(datTemp))
End If

If Day(datTemp) < 10 Then
strDay = "0" + CStr(Day(datTemp))
Else
strDay = CStr(Day(datTemp))
End If
1 answer 1