Save object to file with BinaryFormatter
<p>i want to save my list into a text file , so i convert it into an array,and now i want to write it down.</p>

<pre><code>        public void Save(Group g)
    {
        string[] lines = g.elementsList.ConvertAll(p =&gt; p.ToString()).ToArray();
        BinaryFormatter bf = new BinaryFormatter();
        using (Stream file = File.OpenWrite(path)) 
        {
            foreach (string line in lines)
            {
                using (MemoryStream ms = new MemoryStream())
                {
                    bf.Serialize(ms, lines);
                    byte[] ser = ms.ToArray();

                    &lt;--------stuck here :(

                }
            }
        }
</code></pre>

<p>how do i continue from here? or should i changed the whole approach..</p>
