The Intelligence says
string StringDictionary[string key]
its the only overload
so when I try to use an int there it says:
"Error 1 The best overloaded method match for
'System.Collections.Specialized.StringDictionary.this[string]' has some
invalid arguments "
and there is no "Item" property to access which was one of the links
suggested.
When you post code that is not actually the code you're having problems
with, then it is impossible to provide a useful answer.
That's why I specifically wrote: "Please post a concise-but-complete code
example that reliably reproduces the problem".
In particular, while you _claimed_ to be using the StringCollection class,
according to your most recent reply you were in fact using the
StringDictionary class. That's a completely different class, with
completely different semantics. In particular, it's not possible to index
a StringDictionary by integer; it only allows access by key.
Note that you can get the Values collection of the StringDictionary and
enumerate them, but that still does not provide indexed access. There are
various ways to convert to something that is indexed, but ultimately you
will still have the problem that you are treating an unordered collection
as if it were ordered.
If you want an ordered collection, use StringCollection and not
StringDictionary.
In any case, I hope that you can see why it's so important that when you
post code, you post code that is actually relevant to your question. You
failed to do that here, and it prevented at least three different people
from being able to offer a specific, useful reply.
Pete