Advertisement
zebraxxl

Untitled

May 18th, 2011
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.IO;
  5. using System.Security;
  6. using System.Security.Policy;
  7. using System.Reflection;
  8.  
  9. [assembly: AllowPartiallyTrustedCallers]
  10.  
  11. namespace Core
  12. {
  13.     public static class Core
  14.     {
  15.         [SecurityCritical]
  16.         public static void RunSafe()
  17.         {
  18.             StreamWriter w = new StreamWriter("ups.txt", true);
  19.             w.WriteLine("Ups...");
  20.             w.Close();
  21.         }
  22.  
  23.         [SecuritySafeCritical]
  24.         public static void Run()
  25.         {
  26.             RunSafe();
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement