[Mono-list] Newbie and ArrayList
    Matthijs ter Woord 
    matthijsterwoord at gmail.com
       
    Mon Apr 16 05:40:03 EDT 2007
    
    
  
> initialize DSYears with a collection initialization expression, thus
> keeping everything in one expression instead of multiple statements:
> 
> 	ArrayList DSYears = new ArrayList () { 1 };
> 
> Of course, C# 3.0 hasn't been finalized, and it doesn't exist in mcs
You could use the following:
ArrayList DSYears = new ArrayList(new object[] { 1 });
    
    
More information about the Mono-list
mailing list