public object this[string name]
가 할
class ObjectWithProperties
{
Dictionary<string, object> properties = new Dictionary<string, object>();
public object this[string name]
{
get
{
if (properties.ContainsKey(name))
{
return properties[name];
}
return null;
}
set
{
properties[name] = value;
}
}
}
당신이 여기에있는 것은 인덱싱 된 속성에, 당신 여기에서 더 많은 abou를 읽을 수 있습니다. http://msdn.microsoft.com/en-gb/library/aa288464(v=vs.71).aspx –