text: Q:
  
  Convert list to array C#
  
  Could you tell me how can I put elements from a list to twodimensional array in C#?
  tura = new string[howManyWords, 6];
      howManyWords = 0;
  
      foreach (words word in wc.words)
      {
          if (word.CategoryNumber == scb.Category)
          {
              tura[howManyWords] ......; howManyWords++;
          }
      }
  
  I have a list made from XML file. I work in Unity.
     <?xml version="1.0" encoding="utf-8"?>
  <WordCollection>
    <Words>
      <Word name="$mezczyzna">
        <CategoryNumber>1</CategoryNumber>
        <PolishName>mężczyzna</PolishName>
        <EnglishName>a man</EnglishName>
        <AudioName>man.mp3</AudioName>
        <ImageName>man</ImageName>
        <ImageLocalisationWidth>200</ImageLocalisationWidth>
        <ImageLocalisationHigh>700</ImageLocalisationHigh>
      </Word>
    </Words>
  </WordCollection>
  
  A:
  
  Since we believe you mean by dictionary, and by the ContentNumber, here is an example:
  void Main()
  {
      List<Word> Words = new List<UserQuery.Word> { new Word { CategoryNumber = 0, EnglishName = "WORD1" }, new Word { CategoryNumber = 1, EnglishName = "WORD2" }, new Word { CategoryNumber = 1, EnglishName = "WORD3" } };
  
      Dictionary<CategoryTypes, List<Word>> categoryWords = Words.GroupBy(word => word.CategoryNumber).ToDictionary(x => (CategoryTypes)x.Key, x => x.ToList());
  
      if (categoryWords.ContainsKey(CategoryTypes.Category2))
      {
          List<Word> words = categoryWords[CategoryTypes.Category2];
  
          for (int i = 0; i < words.Count; i++)
          {
              Console.WriteLine(words[i].EnglishName);
          }
      }
  }
  
  class Word
  {
      public int CategoryNumber { get; set; }
      public string EnglishName { get; set; }
  }
  
  enum CategoryTypes
  {
      Category1 = 0,
      Category2 = 1
  }
  
  You can then call the dictionary categoryWords by the type of enum, and then only have your list of words.
  
  