Reading the accepted answer of C# Java HashMap equivalent, it literary states:
C#'s Dictionary uses the Item property for setting/getting items:
- myDictionary.Item[key] = value
- MyObject value = myDictionary.Item[key]
myDictionary.Item[SomeKey] = SomeValue;
Error: CS1061 'Dictionary' does not contain a definition for
Dictionary.Item[SomeKey] = SomeValue;
Difference is simple
Dictionary[SomeKey] = SomeValue; // if key exists already - update, otherwise add Dictionary.Add(SomeKey, SomeValue); // if key exists already - throw exception, otherwise add
As for the error
Error: CS1061 'Dictionary' does not contain a definition for 'Item'
C# allows for "default" indexer, but how it should be implemented internally? Remember that there are many languages working with CLR, not just C#, and they would also need a way to call that indexer.
CLR has properties, and it also allows to provide arguments when those properties getters or setters are called, because properties are really compiled as a pair of get_PropertyName() and set_PropertyName() methods. So, indexer can be represented by a property which getter and setter accept additional arguments.
Now, there cannot be property without a name, so we need to choose a name for the property which represents our indexer. By default, "Item" property is used for the indexer property, but you can overwrite it with IndexerNameAttribute.
Now when indexer is represented as regular named property, any CLR language can called it with get_Item(index).
That's why in article you linked that indexer is referenced by Item. Though when you use it from C#, you have to use appropriate syntax and just call it as
Dictionary[SomeKey] = SomeValue;