Why no StackBase?

  • Thread starter Thread starter Dennis Myrén
  • Start date Start date
D

Dennis Myrén

Hi.

I am in need for a strongly typed last-in-first-out collection
and i am just wondering why there is no such thing provided by the NET
Framework 1.*
as StackBase, since we have CollectionBase and DictionaryBase?
I think that is somewhat strange really, is'nt it?

I have not found any open-source implementations that does the job.
Do you know of any?
Otherwise, i have to take the time to write one myself.


Although i certainly would like to, i cannot yet utilize .NET 2.0(BETA).
 
Dennis Myrén said:
Hi.

I am in need for a strongly typed last-in-first-out collection
and i am just wondering why there is no such thing provided by the NET
Framework 1.*
as StackBase, since we have CollectionBase and DictionaryBase?
I think that is somewhat strange really, is'nt it?

I have not found any open-source implementations that does the job.
Do you know of any?
Otherwise, i have to take the time to write one myself.


Although i certainly would like to, i cannot yet utilize .NET 2.0(BETA).

There is the Stack Object
 
Dennis,

Granted, they could have made it a little easier, but you can use
CollectionBase for a Stack, you just have to change the logic for accessing
the indexer.

Also, in .NET 2.0, you would use Stack<T>.

Hope this helps.
 
Hi Dennis,

Did you try the System.Collections.Stack class?

It's not strongly typed though. With C# generics in 2.0 you will be able to
create customized strongly types collection classes.

HTH,
Rakesh Rajan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top