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

Glossary Item Box

Gets or sets the current length of the temp file. If setting the length on a file that does not exist one will be created. If getting the length of a file that doesnt exist zero will be returned.

Syntax

Visual Basic (Declaration) 
Public Property Length As Long
C# 
public long Length {get; set;}

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

Used By

TestTransactionLog.TestBenchmarkWriteSpeed()
Boolean SecureTransfer.Client.Download(String,String)

Source Code

Library/IO/TempFile.cs

Generated with Document! X 2011 by Innovasys