C# How to access static class List<> from another class
<p>Using C#, I have a static class that has a static list of a custom type. Here is the custom type:</p>

<pre class="lang-cs prettyprint-override"><code>public class LanguageItem
{
    public Word.WdLanguageID Id { get; set; }
    public string Name { get; set; }

    public LanguageItem(string name, int id)
    {
        Id = (Word.WdLanguageID)id;
        Name = name;
    }
}
</code></pre>

<p>And here is the static class that uses this type:</p>

<pre><code>public static class LanguageList
{            
    public static List&lt;LanguageItem&gt; _languageList;

    static LanguageList()
    {
        _languageList.Add(new LanguageItem("Arabic", 1025));
        _languageList.Add(new LanguageItem("Bulgarian", 1026));
        _languageList.Add(new LanguageItem("Catalan", 1027));
        _languageList.Add(new LanguageItem("TraditionalChinese", 1028));
        _languageList.Add(new LanguageItem("Czech", 1029));
        _languageList.Add(new LanguageItem("Danish", 1030));
        _languageList.Add(new LanguageItem("German", 1031));
        _languageList.Add(new LanguageItem("Greek", 1032));
        _languageList.Add(new LanguageItem("EnglishUS", 1033));
        _languageList.Add(new LanguageItem("Spanish", 1034));
        _languageList.Add(new LanguageItem("Finnish", 1035));
        _languageList.Add(new LanguageItem("French", 1036));
        _languageList.Add(new LanguageItem("Hebrew", 1037));
        _languageList.Add(new LanguageItem("Hungarian", 1038));
        _languageList.Add(new LanguageItem("Icelandic", 1039));
        _languageList.Add(new LanguageItem("Italian", 1040));
        _languageList.Add(new LanguageItem("Japanese", 1041));
        _languageList.Add(new LanguageItem("Korean", 1042));
        _languageList.Add(new LanguageItem("Dutch", 1043));
    }

    public static List&lt;LanguageItem&gt; LanguageListItems
    {
        get
        {
            return _languageList;
        }
        private set
        {
            _languageList = value;
        }
    }
}
</code></pre>

<p>What I am trying to do is to use this list from another class, to return the the items from the list. I want to specify the <code>Name</code> and I want to get the <code>Id</code> back.</p>

<p>I tried to use this:</p>

<pre><code>using Word = Microsoft.Office.Interop.Word;

Word.Application oWord = new Word.Application();

oWord.Selection.LanguageID = LanguageList.Single(lang =&gt; lang.Name == strTgtLanguage).Id;
</code></pre>

<p>But I get a compile error that reads:</p>

<blockquote>
  <p>'LanguageList' does not contain a definition for 'Single'</p>
</blockquote>

<p>I tried to look at other similar post, such as <a href="https://stackoverflow.com/questions/30156430/how-to-access-all-specific-versions-of-a-generic-static-class-in-c">How to access all specific versions of a generic static class in C#?</a> and <a href="https://stackoverflow.com/questions/22371418/how-to-access-member-of-a-static-class-which-is-inside-another-static-class">How to access member of a static class which is inside another static class</a> and others, but I can't figure it out based on these.</p>

<p>Also the reason I am using a hard coded enumeration because if I use the COM object <code>Office.Interop.Word</code>, then it takes forever (over 2 minutes) to add all the 250+ items to the list. </p>

<p>Can somebody help me a point out what I am doing wrong and why can't I access the list, or if there is a better approach? Thanks in advance.</p>