Created
July 17, 2009 16:32
-
-
Save mashiro/149145 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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