J
Jon Davis
Jon Skeet said:Well *I* want what VB.NET supports in terms of multiple indexed
properties.
I'm very glad that the feature is missing in C#, for the reason I described
and repeat below. C# strives to be clear and concise, not feature-packed. C#
doesn't have the My. namespace, either, but again, it's the wrong audience
for that sort of thing.
What pisses me off is the introduction of "var" in the next version;
although it is useful, it is so completely contrary IMO to the direction C#
intended to go from the beginning.
Jon
It makes
it much less difficult to get confused about whether you're accessing an
object's indexer or an object's property's indexer, i.e. ...
myObject.myIndexedProp["three"]
.... is "myIndexedProperty" above implemented as an indexed myIndexedProp
property of myObject, or is it the Item property of an object that is
returned by a non-indexed myIndexProp property of myObject??
By forcing C# to use only one optional property as an indexed property,
understanding the code becomes significantly less ambiguous and awkward.
Exposing that single indexed property as "this[...]" made the property bound
to the object by its explicit name.
<<
