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
Post a Comment