Module Module1
Sub Main()
Dim arr As String() = {"VB.NET", "C", "C++", "PHP", "C#"}
Dim ilist As IList(Of String) = Array.AsReadOnly(arr)
Console.WriteLine(ilist(0)) ' VB.NET
Try
ilist(1) = "Java" ' Error
Catch e As NotSupportedException
Console.WriteLine("{0} - {1}", e.GetType(), e.Message)
End Try
End Sub
End Module
' run:
'
' VB.NET
' System.NotSupportedException - Collection Is read - only.