Silly question, but one I must ask as I am trying to create a System.Collections.Big assembly, filled with various collections that use larger indexes.
So, confirm if I am correct, the Array() class is not a simple wrapper for arrays([]) in C#, but is the real deal, correct? So if I upgrade Array to use a larger indexer, I can use the [] operator to get / set things without fear of some hidden nastiness, right?
You are right that
Arrayimplements[], but you cannot extend it.That is, even though
Arrayis not sealed, you cannot derive from it — the system will not let you. So you cannot modifyArray‘s indexing mechanism either.But why would you want to do that anyway?
EDIT
BigArray<T>already exists in the .NET Framework :-), see http://blogs.msdn.com/b/joshwil/archive/2005/08/10/450202.aspx