Reputation: 5761
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?
Upvotes: 0
Views: 196
Reputation: 33139
You are right that Array
implements []
, but you cannot extend it.
That is, even though Array
is not sealed, you cannot derive from it -- the system will not let you. So you cannot modify Array
'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
Upvotes: 7