R
Russell Bearden
Why are there no indexed properties in C#?
For example:
class blah
{
public Node Child[index]
{
get
{
..... some code
return someNode[index];
}
set
{
... some code
someNode[index] = value;
}
}
I prefer to not return a reference to the entire data structure containing
the nodes. Also, doing so prevents me from having much control over
exactly what I am returning, unless it is always just blatantly
someNode[index].
For example:
class blah
{
public Node Child[index]
{
get
{
..... some code
return someNode[index];
}
set
{
... some code
someNode[index] = value;
}
}
I prefer to not return a reference to the entire data structure containing
the nodes. Also, doing so prevents me from having much control over
exactly what I am returning, unless it is always just blatantly
someNode[index].