Mega Code Archive

 
Categories / C# / WPF
 

Security Exception

<Page x:Class="WpfApplication1.Page1"   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     Title="Page1">     <Grid Height="379" Width="361">     </Grid> </Page> //File:Window.xaml.cs using System; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.IO; namespace WpfApplication1 {     public partial class Page1 : Page     {         public Page1()         {             InitializeComponent();             StreamWriter SW;             SW = File.CreateText("c:\\s.txt");             SW.WriteLine("A!");             SW.WriteLine("B");             SW.Close();                       }     } }