using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Files
{
    class Example13
    {
        public static void CreateFile()
        {
            // Listing 16-13
            using (FileStream fs = File.Create("foo.bar"))
            {
            }

            // Analogiczny kod, który nie korzysta z klasy File
            using (var fs = new FileStream("foo.bar", FileMode.Create,
                                           FileAccess.ReadWrite, FileShare.None))
            {
            }
        }
    }
}
