【发布时间】:2009-07-06 21:09:54
【问题描述】:
用这种方法来保存字符串的只读列表是否很好,例如,ADO.NET中的字段列表。
var list = new System.Collections.ObjectModel.ReadOnlyCollection<string>(
new List<string>(4) { "type", "currency", "date", "amount" });
或者这是一个多余的解决方案?
【问题讨论】:
标签: c# .net list collections readonly