using System;
using System.IO;
using System.Security;
using System.Security.Permissions;
using System.Collections.Generic;
using System.Text;

namespace DeclarativeDemo
{
   class Program
   {
      [FileIOPermission(SecurityAction.Demand,
      AllLocalFiles = FileIOPermissionAccess.Write)]
      static void Main(string[] args)
      {
         FileStream fs = new FileStream("mójplik.txt", FileMode.Create);
         fs.WriteByte(65);
         fs.Close();
      }
   }
}
