Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace test
  8. {
  9. public class SecClass
  10. {
  11. public string s1;
  12. public string s2;
  13. public SecClass()
  14. {
  15. s1 = "s1: second";
  16. s2 = "s2: class";
  17. }
  18. ~SecClass()
  19. {
  20. s1 = null;
  21. s2 = null;
  22. }
  23. }
  24.  
  25. partial class origram : SecClass
  26. {
  27. public void MainClass()
  28. {
  29. Console.WriteLine("s1=" +s1+ " s2=" +s2);
  30. SecClass SC = new SecClass();
  31. s1 = "s1: frasecClass";
  32. s2 = "s2: frasecClass";
  33. Console.WriteLine("S1: main=" +s1+ " S2: main=" +s2+ " S1_ SecClass=" +SC.s1+ " S2:SecClass=" +SC.s2);
  34. }
  35. }
  36.  
  37. partial class MainClass
  38. {
  39. public static void Main()
  40. {
  41. Console.Title = "skole_klasser";
  42. origram ori = new origram();
  43. ori.MainClass();
  44. Console.ReadKey();
  45. Environment.Exit(0);
  46. }
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement