Library/Library.Test/TestTempFiles.cs
| C# |  Copy Code | 
|---|---|
| TempFile file = new TempFile();
Stream c = file.Create();
Assert.IsTrue(c.CanWrite);
Assert.IsFalse(c.CanRead);
Stream r = file.Read();
Assert.IsFalse(r.CanWrite);
Assert.IsTrue(r.CanRead);
c.Dispose();
r.Dispose();
file.Dispose(); | |
| VB.NET |  Copy Code | 
|---|---|
| Dim file As New TempFile() Dim c As Stream = file.Create() Assert.IsTrue(c.CanWrite) Assert.IsFalse(c.CanRead) Dim r As Stream = file.Read() Assert.IsFalse(r.CanWrite) Assert.IsTrue(r.CanRead) c.Dispose() r.Dispose() file.Dispose() | |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
TempFile ClassTempFile Members
Source Code
Library/IO/TempFile.csUsed By
IOStream.Compress(String,String)IOStream.Decompress(String,String)
 
     
     
     
    