更新时间:2023-02-15 20:52:28
下面是使用字典作为存储为例:
Here is an example using a dictionary as storage:
public class Foo {
private Dictionary<string, string> _items;
public Foo() {
_items = new Dictionary<string, string>();
}
public string this[string key] {
get {
return _items[key];
}
set {
_items[key]=value;
}
}
}