CSharpTest.Net
Delete() Method
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.IO Namespace > TempDirectory Class > Delete Method : Delete() Method

Glossary Item Box

Deletes the current temp directory immediatly if it exists.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub Delete() 
C# 
public void Delete()

Example

Library/Library.Test/TestTempFiles.cs

C#Copy Code
TempDirectory dir;
using(dir = new TempDirectory())
{
    Assert.IsTrue(dir.Exists);
    dir.Delete();
    Assert.IsFalse(dir.Exists);
}
VB.NETCopy Code
Dim dir As TempDirectory
Using dir = New TempDirectory()
    Assert.IsTrue(dir.Exists)
    dir.Delete()
    Assert.IsFalse(dir.Exists)
End Using

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys