Author Topic: StringCollection();  (Read 2042 times)

0 Members and 1 Guest are viewing this topic.

JimAndi

  • Guest
StringCollection();
« 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

gile

  • Water Moccasin
  • Posts: 2406
  • Marseille, France
Re: StringCollection();
« Reply #1 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.
« Last Edit: August 24, 2011, 03:01:41 AM by gile »
Speaking English as a French Frog

JimAndi

  • Guest
Re: StringCollection();
« Reply #2 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: