Example #1
0
        //BACKUP
        private void Form1FormClosing(object sender, FormClosingEventArgs e)
        {
            FileStream fs = new FileStream(cacheFile, FileMode.Create, FileAccess.Write, FileShare.None);

            byte[] array;
            //below simple methods converts all the cache objects into byte array
            _cache.BackupCache(out array, true);
            fs.Write(array, 0, array.Length);
            fs.Close();
        }