How can I start the index in an ArrayList
at 1 instead of 0? Is there a way to do that directly in code?
(Note that I am asking for ArrayList
As the other answers suggest, there are ways to simulate this, but no direct way to do this in C# or other commonly used .NET languages. Quoting Eric Gunnerson:
The CLR does support this kind of construct (I had a hard time not using the term "travesty" here...), but there aren't, to my knowledge, any languages that have built-in syntax to do that.