title: Drag and drop words into a graph WindowsForms
body: <p>How can I make a graphic in C# when I use drag and drop functionality with string types from a word document? The idea is that I want to make a graphic which represents the length of the words that I should drag and drop.</p>
  
  <p>In the program which I coded, the functionality is dragging and dropping numbers and make a graphic which shows the difference between their values.</p>
  
  <p>For example, I want to drag and drop 'Book, Pen' on a graphic that I already have on my WindowsForms in the moment of starting the program and The Bar Chart reflects first column bigger than the second one. Book-> 4 letters; Pen-> 3 letters</p>
  
  <pre><code>public class Grafic: Control
  {
      int[] valori;
  
      private void Grafic_DragDrop(object sender, DragEventArgs e)
      {
          if (e.Data.GetDataPresent(typeof(string)))
          {
              string valoriString =
                  (string)e.Data.GetData(typeof(string));
              //MessageBox.Show(valoriString);
  
              Valori = valoriString
                      .Split(',')
                      .Select(val =&gt; int.Parse(val))
                      .ToArray();
          }
      }        
  </code></pre>
  
  <p>So this is my problem and i have to modify in some way the part of the code where is that int.Parse(val).</p>
  
  <p>I expect the graphic accept the string types and reflect what I described.</p>