CSharpTest.Net
Exists Property
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.IO Namespace > TempDirectory Class : Exists Property

Glossary Item Box

Returns true if the current temp directory exists.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Exists As Boolean
C# 
public bool Exists {get;}

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