c# - Unable to declare an ArrayList -


i'm not able declare arraylist. here's code. (i'd rather use lists, i'm trying understand concept of arraylist).

private void button1_click(object sender, eventargs e) {     arraylist salestotals = new arraylist();     decimal[] decimalsales = { 1000m, 2000m, 3000m };      foreach (decimal singlesales in decimalsales)     {         salestotals.add(singlesales);     } } 

when compile this, error:

'arraylist' 'namespace' used 'type' 

i'm using namespace system.collections (not .generic)

what causing , how fix it?

it sounds using arraylist within namespace called arraylist. symbol resolving namespace definition, invalid in symbol's context, causing error describe.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -