Imports System
Imports System.Collections.Generic
Imports System.Text
Namespace Indexers
Class ParentClass
Private range As String() = New String(4) {}
Default Public Property Item(ByVal indexrange As Integer) As String
Get
Return range(indexrange)
End Get
Set(ByVal value As String)
range(indexrange) = value
End Set
End Property
End Class
' The Above Class just act as array declaration using this pointer
Class childclass
Public Shared Sub Main()
Dim obj As New ParentClass()
' The Above Class ParentClass create one object name is obj
obj(0) = "ONE"
obj(1) = "TWO"
obj(2) = "THREE"
obj(3) = "FOUR"
obj(4) = "FIVE"
Console.WriteLine("WELCOME TO C# CORNER HOME PAGE" & Chr(10) & "")
Console.WriteLine("" & Chr(10) & "")
Console.WriteLine("{0}" & Chr(10) & ",{1}" & Chr(10) & ",{2}" & Chr(10) & ",{3}" & Chr(10) & ",{4}" & Chr(10) & "", obj(0), obj(1), obj(2), obj(3), obj(4))
Console.WriteLine("" & Chr(10) & "")
Console.WriteLine("ALS.Senthur Ganesh Ram Kumar" & Chr(10) & "")
Console.WriteLine("" & Chr(10) & "")
Console.ReadLine()
End Sub
End Class
End Namespace
NOTE: THIS ARTICLE IS CONVERTED FROM C# TO VB.NET USING A CONVERSION TOOL. ORIGINAL ARTICLE CAN BE FOUND ON C# Corner (http://www.c-sharpcorner.com/).