0

In C# I can do this:

string outcome = (success?"succeeded":"failed")

But in VB.NET is this syntax the only equivalent operation?:

If (success) Then
    outcome = "succeeded"
Else
    outcome = "failed"
End If
Mike Bruno
  • 600
  • 2
  • 9
  • 26

1 Answers1

2
outcome = If(success,"succeeded","failed")
A Friend
  • 2,750
  • 2
  • 14
  • 23
  • 1
    Beat me to it - but just an addition, [C to VB converter](http://converter.telerik.com/) will really help you along your way! – Chicken Apr 13 '18 at 15:12