VB
戻り値が Double? のとき If IsHoge Then Return 5.0 End If Return Nothing と Return If(IsHoge, 5.0, Nothing) では、IsHoge = False の時 前者 Nullable(Of T).HasValue = False 後者 Nullable(Of T).HasValue = True (.Value = 0.0) という挙動の違いが…
戻り値が Double? のとき If IsHoge Then Return 5.0 End If Return Nothing と Return If(IsHoge, 5.0, Nothing) では、IsHoge = False の時 前者 Nullable(Of T).HasValue = False 後者 Nullable(Of T).HasValue = True (.Value = 0.0) という挙動の違いが…