title: C# Bind Generic List To Textbox WinForms?
body: <p>I have a method that returns a list of type string. I want to bind each item in the list to the textbox so essentially it looks like a listbox, except it will be editable since its actually a textbox!</p>
  
  <p>any ideas on how to go about doing this!?</p>
  
  <p>CODE:</p>
  
  <pre><code>public List&lt;string&gt; GetAgentsDetails(string writeDir)
      {
          List&lt;string&gt; agentInfoList = new List&lt;string&gt;();
  
          XElement doc = XElement.Load(writeDir);
  
          var getDetails =
              (from n in doc.Elements("Agent")
               select n.Element("Name").Value + "," + n.Element("EmailAddress").Value);
          foreach (var info in getDetails)
          {
              agentInfoList.Add(info);
          }
          return agentInfoList;
  
      }
  </code></pre>