I am familiar with C#, but not at all with VB and I want to convert a C# example (in LINQPad) into VB:
if (2 + 2 == 4)
"True".Dump();
I came up with the following working VB code:
Dim word = "True"
If 2 + 2 = 4 Then
word.Dump
End If
Now, why could I not just write the following instead ?
If 2 + 2 = 4 Then
"True".Dump ' BC30035 Syntax error
End If
It seems like I cant apply a method to a litteral in VB and I must store it in a variable prior, but surely I must be missing something here... no ?
P.S. Parentheses around the string are not working any better.