Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

vbnc does not understand "Auto-Implemented" Properties (aka single-line properties) #46

Open
rolfbjarne opened this issue May 22, 2018 · 1 comment

Comments

@rolfbjarne
Copy link
Member

rolfbjarne commented May 22, 2018

Submitted by a community member on 2016-11-14 19:41 UTC

For code such as:

Public Property Title As String
Public Property ShortName As String

Instead of compiling, the compiler fatal errors with:

Error VBNC90019: Expected 'End'. (VBNC90019) (libDashboard)
Error VBNC30205: End of statement expected. (VBNC30205) (libDashboard)
Error VBNC30124: Property without a 'ReadOnly' or 'WriteOnly' specifier must provide both a 'Get' and a 'Set'. (VBNC30124) (libDashboard)
Linux Arch 4.4.27-1-lts #1 SMP Sat Oct 22 17:17:59 CEST 2016 x86\_64 GNU/Linux
extra/mono 4.6.1.3-1 [installed]
extra/mono-addins 1.1-1 [installed]
extra/mono-basic 4.0.1-1 [installed]

Reference: https://bugzilla.xamarin.com/show_bug.cgi?id=46950

@ni-ka
Copy link

ni-ka commented Aug 3, 2018

The workaround is to change the declarations from:

Public Property RegionId As Integer

into:

Public Property RegionId() As Integer
Get
Return _RegionId
End Get
Set(ByVal value As Integer)
_RegionId = value
End Set
End Property

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants