using
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | using [2018/04/22 11:10] (current) – created wolfgangriedmann | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | The '' | ||
+ | < | ||
+ | using System.Text | ||
+ | |||
+ | function Start( ) as void | ||
+ | local cFileName as string | ||
+ | local aBytes as byte[] | ||
+ | |||
+ | cFileName := " | ||
+ | System.Console.WriteLine(" | ||
+ | begin using var oFile := FileStream{ cFileName, FileMode.OpenOrCreate, | ||
+ | aBytes := Encoding.ASCII.GetBytes( "Hello world!" | ||
+ | oFile: | ||
+ | end using | ||
+ | // file is not only out of scope, but also disposed, i.e. closed | ||
+ | System.Console.WriteLine(" | ||
+ | System.Console.Write( "press a key...." | ||
+ | System.Console.ReadKey() | ||
+ | |||
+ | return</ | ||
using.txt · Last modified: 2018/04/22 11:10 by wolfgangriedmann