Your javascript example does not correspond to dictionary as well as:
var myDictionary = [];
myDictionary["namevalue1"] = "value1";
myDictionary["namevalue2"] = "value2";
Now, we can do everything with my code that we can do with yours, but it's not really modelling the same thing. Yours defines properties while mine associates values with keys. You've semantically created a structured object, I've created a flatter object though I have a bit more flexibilty in the case where I don't know what string I will use as the key (not that much more in js, since js's runtime flexibility means it's not too hard to dynamically add new properties if the key is a valid label.
Just like in Javascript, in C#:
If you've a small set of properties that are known at compile time, then a class with such properties most closely models your intent.
If you've a large set of properties or do not know them at compile time, then a dictionary will most closely model your intent.
The fact that these are likely to be the most performant for either cases is just a bonus, model your intent as best as the language allows first, think about stepping away from what does so later if absolutely necessary.
No different to JS really, except it's a bit stricter as to just which you're doing at a time (we can get around that strictness if we really need to, but do you?).