[问题] array的封装

楼主: sweetjp6 (水饺)   2015-07-21 20:45:10
想请问一个array封装的办法
Ex:
private Dictionary<string, string>[] xyz =
new Dictionary<string, string>[]
{
new Dictionary<string, string>(),
new Dictionary<string, string>(),
new Dictionary<strgin, string>()
}
public Dictionary<string, string>[] Xyz
{
get;
set;
}
请问get, set部分应该怎么写才能够access到每个元素呢?
可能用法如下:
Dictionary<string, string> x1 = Xyz[0];
请各位不吝赐教, 谢谢

Links booklink

Contact Us: admin [ a t ] ucptt.com