如何返回一个只读泛型集合

 

  Private md_states As New List(Of String)

  Private md_states As New List(Of String)

 

    ReadOnly Property States() As System.Collections.ObjectModel.ReadOnlyCollection(Of String)

        Get

            Return Me.md_states.AsReadOnly

        End Get

    End Property

 

posted on 2010-03-10 16:34  zqonline  阅读(366)  评论(0编辑  收藏  举报

导航