Why does the Compiler complain about the following line
Public ReadOnly Property Name As String
that
error BC30126: 'ReadOnly' property must provide a 'Get'
I thought auto-implemented readonly properties were supported in VB 14? Or am I doing something wrong here by compiling from the Commandline using vbc.exe
delivered by the .NET Framework 4.0.30319 with Microsoft (R) Visual Basic Compiler version 14.6.1586?
Do I need to use Visual Studio to support that?
Edit: A concrete Example - shouldn't this work?
Class A
Sub New(name As String)
Me.Name = name
End Sub
Public ReadOnly Property Name As String
End Class
The above example indeed should work but doesn't in my case. Can someone for whom this is working please confirm that his Compilerversion is any different than mine?