IsolatedStorageFileStream.SetLength Method (Int64)


Sets the length of this IsolatedStorageFileStream object to the specified value.

Namespace:   System.IO.IsolatedStorage
Assembly:  mscorlib (in mscorlib.dll)

public override void SetLength(
	long value


Type: System.Int64

The new length of the IsolatedStorageFileStream object.

Exception Condition

value is a negative number.

If the specified value is less than the current length of the IsolatedStorageFileStream object, the stream is truncated. If the specified value is larger than the current length of the stream, the stream is expanded. If the stream is expanded, the contents of the stream between the old and the new length are undefined. In order to use this method, an IsolatedStorageFileStream object must support both writing and seeking.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top