oo-70-245-1

oo-70-245-1 Commit Details


Date:2015-09-28 18:37:55 (9 years 17 days ago)
Author:Natalie Adams
Branch:master
Commit:3dd8646d2dd448d044e121507cf6e28cb9c62703
Parents: 75071bf8dfd9cabee21234ceb68ea5a2b5b7beef
Message:Adding destruct example

Changes:

File differences

Powerpoint Examples/Powerpoint 2/p7-descturct.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace destructor
{
class DisposeTest : IDisposable
{
public void Dispose()
{
Console.WriteLine("Cleaning up DisposeTest!");
}
}
class DestructTest
{
~DestructTest()
{
Console.WriteLine("Cleaning up Destruct Test");
}
}
class Program
{
static void Main(string[] args)
{
{
DestructTest t2 = new DestructTest();
}
Console.WriteLine("top");
using (DisposeTest t = new DisposeTest())
{
}
Console.WriteLine("bottom");
}
}
}

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.05840s using 14 queries.