Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace test
- {
- public class SecClass
- {
- public string s1;
- public string s2;
- public SecClass()
- {
- s1 = "s1: second";
- s2 = "s2: class";
- }
- ~SecClass()
- {
- s1 = null;
- s2 = null;
- }
- }
- partial class origram : SecClass
- {
- public void MainClass()
- {
- Console.WriteLine("s1=" +s1+ " s2=" +s2);
- SecClass SC = new SecClass();
- s1 = "s1: frasecClass";
- s2 = "s2: frasecClass";
- Console.WriteLine("S1: main=" +s1+ " S2: main=" +s2+ " S1_ SecClass=" +SC.s1+ " S2:SecClass=" +SC.s2);
- }
- }
- partial class MainClass
- {
- public static void Main()
- {
- Console.Title = "skole_klasser";
- origram ori = new origram();
- ori.MainClass();
- Console.ReadKey();
- Environment.Exit(0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement