readonly keyword does not make a List<> ReadOnly?

后端 未结 3 1915
心在旅途
心在旅途 2020-12-01 14:17

I have the following code in a public static class:

public static class MyList
{
    public static readonly SortedList> CharList         


        
3条回答
  •  感动是毒
    2020-12-01 14:24

    The List have the AsReadOnly method that return a read only list should be what you want.

提交回复
热议问题