View Single Post
 
Old 08-16-2017, 08:14 AM
JeremyBenson11 JeremyBenson11 is offline
Regular
 
Join Date: Dec 2013
Posts: 50
Default Public Property Expresion Expected

Hello,

I'm getting an error expression expected when trying to set a public property, but can't seem to find the error. Thanks for reading.

Class
Code:
Public Class World
	Public Property currentRoom() As String
		Get
			Return Me.currentRoom
		End Get
		Set(ByVal value As String)
			Me.currentRoom = value
		End Set
	End Property
	Public Property currentRegion() As String
		Get
			Return Me.currentRegion
		End Get
		Set(ByVal value As String)
			Me.currentRegion = value
		End Set
	End Property
End Class
Program
Code:
Module Program
	Sub Main()
		Dim world As World = New World()
		world.currentRoom = 'Bedroom'
		Console.Write("Press any key to continue . . . ")
		Console.ReadKey(True)
	End Sub
End Module
Reply With Quote