Skip to content

Instantly share code, notes, and snippets.

@mashiro
Created July 17, 2009 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mashiro/149145 to your computer and use it in GitHub Desktop.
Save mashiro/149145 to your computer and use it in GitHub Desktop.
Module Module1
Sub Main()
Dim f = New Foo()
Dim v = f.Value
Dim c = f.Count
End Sub
End Module
Class Foo
Dim _value As Integer
Dim _count As Integer
Public Sub New()
_value = 10
_count = 0
End Sub
Public ReadOnly Property Value() As Integer
Get
_count += 1
Return _value
End Get
End Property
Public ReadOnly Property Count() As Integer
Get
Return _count
End Get
End Property
End Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment