Using Water (version 188.8.131.5237), I tried out the menu option Edit => Paste => Paste & convert C# code, and the resulting code doesn’t seem quite right in three areas related to property definitions. This C# code:
private string mString;
public string Test
mString = value;
Yields this Mercury code:
Private Dim mString As String
Public Property Test As String()
Me.mString = value
The things that look not quite right to me are:
I think it should be just “Private mString as String”, not “Private Dim mString as String”.
It is missing the initial “Get” statement,
Shouldn’t “Set” instead be “Set (value as String)”? (I might be wrong about that, as Mercury might allow this syntax.)
Yeah, I recalled that it might be optional, but I was thinking it was a Mercury thing, not an optional VB thing. I’m certainly no expert on what is allowable VB.NET syntax - I guess I’ve fallen into a pattern on what works for me, and everything else looks strange to me!
The original code I was converting had lots of properties and most or all of them were missing the starting “Get” (and so it wouldn’t compile), so that’s what made me look closer. Probably if that wasn’t an issue, I wouldn’t have necessarily noticed/mentioned the other differences.