TheSwamp

Code Red => .NET => Topic started by: JimAndi on August 23, 2011, 10:23:02 PM

Title: StringCollection();
Post by: JimAndi on August 23, 2011, 10:23:02 PM
Hi All,

I am trying to undertand the Layer functions listed in the Reference Links for LIBRARY Routine threads.

StringCollection layerset = new StringCollection(); What is this looking for...  I am see an error "The type or namespace name 'StringCollection' could not be found (are you missing a using directive or an assembly reference?"

Help!

Jim
Title: Re: StringCollection();
Post by: gile on August 24, 2011, 02:58:13 AM
Hi,

Try:
Code: [Select]
System.Collections.Specialized.StringCollection layerset =
    new System.Collections.Specialized.StringCollection();

or:
Code: [Select]
using System.Collections.Specialized
...
StringCollection layerset = new StringCollection();

You can use System.Collections.Generic.List<string> too.
Title: Re: StringCollection();
Post by: JimAndi on August 24, 2011, 04:53:53 PM
Thank you.... as you can see I am very new to C# and trying to learn this... Again Thank you :lol: