create an object and add a List<string>
<p>I have a class Category that has:</p>

<pre><code>public int id { get; set; }
public string catName { get; set; }
public List&lt;string&gt; subCat { get; set; }
</code></pre>

<p>I want to create a list like this: </p>

<pre><code>List&lt;Category&gt; list = new List&lt;Category&gt;();
Category cat = new Category(){ 1 ,"Text", new List&lt;string&gt;(){"one", "two", "three"}};
list.Add(cat);
</code></pre>

<p>I get red error mark with this error message:</p>

<blockquote>
  <p>Cannot initialize type 'Category' with a collection initializer because it does not implement 'System.Collection.IEnumerable'</p>
</blockquote>

<p>Any help would be much appriciated.</p>