title: C# Error CS1503 Argument 1: cannot convert from 'string' to 'Character'
body: <p>The problem is that I keep getting this error </p>
  
  <blockquote>
    <p>Cannot convert from OmzetApplicatie.lib.Category to string</p>
  </blockquote>
  
  <p>The error occurs on this line of code:</p>
  
  <pre><code>categories.Add(new Category(item));
  </code></pre>
  
  <p>Complete code:</p>
  
  <pre><code>List&lt;string&gt; categories;
  
  private void Window_Loaded(object sender, RoutedEventArgs e)
  {
      string[] categorynames = { "Vlees", "Snacks", "Drank", "Groenten en Fruit", "Droge voeding", "Sauzen", "Diepvries" };
  
      foreach (string item in categorynames)
      {
          categories.Add(new Category(item));
      }
  
      Product[][] products = {
              new Product[] { new Product("gehakt", 6.4M, 5.30M), new Product("hamburger", 9.0M, 6.25M), new Product("kip", 9.7M, 7.13M), new Product("biefstuk", 17.9M, 13.38M), new Product("preparé", 10.3M, 7.86M) },
              new Product[] { new Product("chips", 1.8M, 1.51M), new Product("nootjes", 7.00M, 5.83M), new Product("suikerwafels", 0.9M, 0.73M), new Product("snoep", 1.9M, 1.34M) },
              new Product[] { new Product("water", 0.3M, 0.23M), new Product("cola", 2.0M, 1.55M), new Product("ice-tea", 1.8M, 1.23M), new Product("fanta", 1.8M, 1.34M), new Product("sprite", 1.8M, 1.36M) },
              new Product[] { new Product("appels", 1.2M, 1.03M), new Product("komkommer", 0.4M, 0.36M), new Product("paprika", 2.4M, 2.05M), new Product("banaan", 1.4M, 1.15M), new Product("champignons", 0.8M, 0.63M) },
              new Product[] { new Product("spaghetti", 1.3M, 1.05M), new Product("rijst", 2.2M, 2.03M), new Product("hamburgerbroodjes", 2.4M, 2.17M), new Product("brood", 1.4M, 1.03M), new Product("macaroni", 0.3M, 0.26M) },
              new Product[] { new Product("ketchup", 2.7M, 2.27M), new Product("mayonaise", 1.7M, 1.12M), new Product("pesto", 0.8M, 0.63M), new Product("tomatensaus", 0.5M, 0.38M) },
              new Product[] { new Product("ijs", 1.7M, 1.34M), new Product("frieten", 1.7M, 1.62M), new Product("kroketten", 3.2M, 3.05M), new Product("frikandel", 1.9M, 1.62M), new Product("pizza", 2.3M, 2.16M) }
      };
  
      for (int i = 0; i &lt; products.Length; i++)
      {
          foreach (Product p in products[i])
          {
              categories[i].AddProduct(p);
          }
      }
  }
  </code></pre>
  
  <p>This is my class from my class library </p>
  
  <pre class="lang-cs prettyprint-override"><code>namespace OmzetApplicatie.lib
  {
      public class Category
      {
          public string item;
          public string[] categorynames;
  
          public Category(string item)
          {
              this.item = item;
          }
      }
  }
  </code></pre>