Library/Library.Test/TestTempFiles.cs
| C# | Copy Code |
|---|---|
TempFile filea = new TempFile(); string path = filea.TempPath; Assert.IsTrue(File.Exists(path)); Assert.AreEqual(path, filea.Detatch()); Assert.IsTrue(File.Exists(path)); filea.Dispose(); Assert.IsTrue(File.Exists(path)); File.Delete(path); | |
| VB.NET | Copy Code |
|---|---|
Dim filea As New TempFile() Dim path As String = filea.TempPath Assert.IsTrue(File.Exists(path)) Assert.AreEqual(path, filea.Detatch()) Assert.IsTrue(File.Exists(path)) filea.Dispose() Assert.IsTrue(File.Exists(path)) File.Delete(path) | |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
TempFile ClassTempFile Members