Reputation: 4796
I just asked a question, where the answer proposed to use the If()
function.
I tried in my Visual Studio, but it seems not present...
Here is a screenshot of the Intellisense :
It only shows me the classical If structure.
When I write it out completely
If(True, Debug.Write("A"), Debug.Write("B"))
I get a syntax error, saying :
If must end by a corresponding End If
What am I missing here ?
.Net Framework 3.5
Visual Studio 2012 Express
The project is a Console Application and I tried also in Winforms...
Upvotes: 0
Views: 100
Reputation: 2297
The If() operator returns a value, try:
Debug.Write(If(True, "A", "B"))
Upvotes: 3