Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyClass{
- public int x;
- public MyClass(int i) {
- x = i;
- }
- //~MyClass() {
- // Console.WriteLine("Jest wywolany destruktor");
- //}
- }
- class Program
- {
- public static void Main(string[] args)
- {
- MyClass t1 = new MyClass(10);
- MyClass t2 = new MyClass(20);
- Console.WriteLine(t1.x + " " + t2.x);
- Console.WriteLine("Jest wywolany destruktor");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement