V
Vincent Finn
Hi,
Is there any way of having a strongly typed dynamic array in C#?
ArrayList requires you to cast every time you want to access an
element
object[] isn't dynamic
I have resorted writing a hacky Add() function for object[] (below)
the other alternative was deriving a ArrayListBool etc.. from
ArrayList where the indexer did the cast and returned a strong type
but I would have though there must be a better way than these?
I want an equivalent to the C++ std::vector<type>
It seems like an astonishing oversight to leave that out of the
framework
Am I missing something obvious here?
Vin
Is there any way of having a strongly typed dynamic array in C#?
ArrayList requires you to cast every time you want to access an
element
object[] isn't dynamic
I have resorted writing a hacky Add() function for object[] (below)
the other alternative was deriving a ArrayListBool etc.. from
ArrayList where the indexer did the cast and returned a strong type
but I would have though there must be a better way than these?
I want an equivalent to the C++ std::vector<type>
It seems like an astonishing oversight to leave that out of the
framework
Am I missing something obvious here?
Vin