Example #1
0
        private void ClearAndLoadItems()
        {
            listBox1.Items.Clear();
            var allsaved  = JsonSerialization.DeSerializeAndLoadAll <Person>();
            var allsaved2 = JsonSerialization.DeSerializeAndLoadAll <Booking>();

            if (allsaved != null)
            {
                foreach (var item in allsaved)
                {
                    listBox1.Items.Add(item.FirstName);
                }
            }
            if (allsaved2 != null)
            {
                foreach (var item in allsaved2)
                {
                    listBox1.Items.Add(item.Title);
                }
            }
        }