90 likes | 213 Views
WorkShop .NET. Med Olav Hermansen olavjh@hiof.no. Øving 1. Øving 2. Øving 2. using (FileStream inFile = File.OpenRead(myFile)) { using (FileStream outFile = File.Create(myFile + ".new.txt")) {
E N D
WorkShop .NET Med Olav Hermansen olavjh@hiof.no
Øving 2 using (FileStream inFile = File.OpenRead(myFile)) { using (FileStream outFile = File.Create(myFile + ".new.txt")) { using (CryptoStream cryptoStream = new CryptoStream(inFile, transform, CryptoStreamMode.Read)) { using (GZipStream compress = new GZipStream(cryptoStream, CompressionMode.Decompress)) { compress.CopyTo(outFile); txtLog.AppendText("Decompressing " + myFile + " to " + myFile + ".new.txt\n"); } } } }
Hello World • Properties • Click
Heavy calculations • MessageBox • Convert • Exceptions
Log stuff you do • DateTime • ListView • Anchor
Log stuff you do: And save it to file • SaveFileDialog • StreamWriter • ToolStripMenu
Log stuff you do: Open file • OpenFileDialog • StreamReader • Split