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

Glossary Item Box

Disposes of the temporary file

Syntax

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

Example

Library/Library.Test/TestTempFiles.cs

C#Copy Code
TempFile f = new TempFile();
f.Length = 5;
Assert.AreEqual(f.Length, f.Info.Length);
f.Dispose();

Assert.AreEqual(0, f.Length);
VB.NETCopy Code
Dim f As New TempFile()
f.Length = 5
Assert.AreEqual(f.Length, f.Info.Length)
f.Dispose()

Assert.AreEqual(0, f.Length)

Requirements

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

See Also

Reference

TempFile Class
TempFile Members
Overload List

Used By

BasicTests.TestBulkInsert()
SampleCustomTypeTest.Teardown()
BasicFileTests.TearDown()
BPlusTree DictionaryTestsVersion2.BTreeFactory.Create()
ThreadedBTreeTest.Teardown()
TempFile TempFile.FromCopy(String)
TempFile.Delete(String)
ScriptRunner.Dispose()

Source Code

Library/IO/TempFile.cs

Generated with Document! X 2011 by Innovasys