Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you don't need to be able to edit the files by hand you could try using the BinaryFormatter to serialize &amp; deserialize your data, should be a lot faster than the XmlSerializer.</p> <p>Here is an example of how to use it.</p> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace WpfApplication2 { [Serializable()] public class Child { public string Property1 { get; set; } } [Serializable()] public class TestClass { public int Property1 { get; set; } public string Property2 { get; set; } public DateTime Property3 { get; set; } public Child Child { get; set; } } /// &lt;summary&gt; /// Interaction logic for MainWindow.xaml /// &lt;/summary&gt; public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); TestClass testClass = new TestClass() { Property1 = 1, Property2 = "test", Property3 = DateTime.Now, Child = new Child() { Property1 = "test", } }; System.Runtime.Serialization.Formatters.Binary.BinaryFormatter formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); System.IO.MemoryStream memoryStream = new System.IO.MemoryStream(); formatter.Serialize(memoryStream, testClass); memoryStream.Position = 0; TestClass deserialized = formatter.Deserialize(memoryStream) as TestClass; } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload