I'm building a tree-based data structure and overloaded [ ] so that I can say
node["key1", "key2", "key3"]
which returns the node whose parents 1, 2, and 3 levels above are the nodes with those keys. the nodes conceptually map to an array of data, so what I have now is this function:
node[keys...].SetValue(i, value)
which sets the i-th value in the node's data. what would be nice is if I could do this:
node[keys][i] = value
problem is, node[keys] returns a node, so the [i] indexing tries to get at another node. basically what I want to be able to do is overload "[ ][ ]" as an operator, which I can't.
is there any way to get at what I'm trying to do?