C#: Basic ArrayList question: Unable to declare an ArrayList?

It sounds like you are using the ArrayList within a namespace itself called ArrayList The symbol is resolving to the namespace definition, which is invalid in the symbol's context, causing the error you describe.

It sounds like you are using the ArrayList within a namespace itself called ArrayList. The symbol is resolving to the namespace definition, which is invalid in the symbol's context, causing the error you describe.

2 sigh... I just proved my absolute "newbness". In visual studio, since I was trying to test a basic ArrayList, I called the project "ArrayList", which resulted in using a namespace with the same name. Thanks for pointing this out @mdm.

– Ray Jul 1 at 20:03 No worries, it happens to the best of us :-) – mdm Jul 1 at 20:03.

One of the namespaces in your project is ArrayList. This is causing the conflict. Try changing the namespace, or fully qualifying it like this: System.Collections.

ArrayList salesTotals = new System.Collections. ArrayList ().

Thanks for providing the full qualification code @agent-j – Ray Jul 1 at 20:08.

That would do it. The compiler is finding a namespace called ArrayList. Try fully qualifying it ie new System.ArrayList().

It would be System.Collections.ArrayList(). – mdm Jul 1 at 20:04.

Cause you have a namespace defined with the name ArrayList. Change the namespace name to something different.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions