title: How do you pass a List object to Javascript in Silverlight?
body: <p>I have a silverlight class with the following block of code:</p>
  
  <pre><code>List&lt;string&gt; s = new List&lt;string&gt;();
              s = command.DDECommand; //command is an object that i pass to this static class and DDECommand is a List&lt;string&gt; within that object.
              if (HtmlPage.BrowserInformation.Name == "Microsoft Internet Explorer")
              {
                  (Application.Current.RootVisual as FrameworkElement).Dispatcher.BeginInvoke(delegate()
                  {
                      HtmlPage.Window.Invoke("javascript_cmd", s);
                  });
                  return true;
              }
  </code></pre>
  
  <p>I've read <a href="http://forums.silverlight.net/forums/p/32131/184880.aspx" rel="nofollow">here</a> that you should be able to pass a List of strings to a javascript function and be able to iterate through the list in javascript. However when I try to do the this, as illustrated in the above code, I find that javascript only receives the parameter as the string <code>"{...}"</code>. Was <a href="http://forums.silverlight.net/forums/p/32131/184880.aspx" rel="nofollow">this post</a> incorrect? Is there anything I am doing wrong in passing the List?</p>