I’ve run into a problem after converting another project to Mercury from VB.NET. This is a project that contains generated classes using LLBLGen, and it will not compile. Here’s an example of the code that won’t compile - notice there is no “Then” at the end of the first line:
If ((fields(0).ExpressionToApply Is Nothing) OrElse (Not expressionToExecute Is Nothing))
fields(0).ExpressionToApply = expressionToExecute
End If
The error is: ‘(E1) “then” expected, got identifier’.
However, it turns out that code like this is completely valid in VB.NET - “Then” is apparently optional if it is multi-line. I had no idea!
I’ve never done it, but I might be able to change LLBLGen’s code generator to add the “Then”, but I’d rather not if I don’t have to. (In this particular project this syntax is used A LOT.) Is this something that can be changed so that it is consistent with VB.NET’s allowed syntax?
–Avonelle