Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Enum Test
- One
- Two
- Three
- End Enum
- Private Class MyTest
- Default Public Shadows ReadOnly Property Item(Index As Integer) As Object
- Get
- Console.WriteLine("From Integer " & Index.ToString())
- Return Nothing
- End Get
- End Property
- Default Public Shadows Property Item(Field As Test) As Object
- Get
- Console.WriteLine("From Enum " & Field.ToString())
- Return Nothing
- End Get
- Set(value As Object)
- Console.WriteLine("Set From Enum " & Field.ToString())
- End Set
- End Property
- End Class
- Sub Main()
- Dim T As New MyTest()
- Dim A = T.Item(Test.One)
- Dim B = T.Item(2)
- Dim C = T.Item(23)
- Console.ReadLine()
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement