Export (0) Print
Expand All

FileStream Methods

The methods of the FileStream class are listed here. For a complete list of FileStream class members, see the FileStream Members topic.

Public Methods

public methodBeginRead

Supported by the .NET Compact Framework.

Overridden. Begins an asynchronous read.
public methodBeginWrite

Supported by the .NET Compact Framework.

Overridden. Begins an asynchronous write.
public methodClose

Supported by the .NET Compact Framework.

Overridden. Closes the file and releases any resources associated with the current file stream.
public methodCreateObjRef (inherited from MarshalByRefObject) Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
public methodEndRead

Supported by the .NET Compact Framework.

Overridden. Waits for the pending asynchronous read to complete.
public methodEndWrite

Supported by the .NET Compact Framework.

Overridden. Ends an asynchronous write, blocking until the I/O operation has completed.
public methodEquals (inherited from Object)

Supported by the .NET Compact Framework.

Overloaded. Determines whether two Object instances are equal.
public methodFlush

Supported by the .NET Compact Framework.

Overridden. Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
public methodGetHashCode (inherited from Object)

Supported by the .NET Compact Framework.

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetLifetimeService (inherited from MarshalByRefObject) Retrieves the current lifetime service object that controls the lifetime policy for this instance.
public methodGetType (inherited from Object)

Supported by the .NET Compact Framework.

Gets the Type of the current instance.
public methodInitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
public methodLock Prevents other processes from changing the FileStream while permitting read access.
public methodRead

Supported by the .NET Compact Framework.

Overridden. Reads a block of bytes from the stream and writes the data in a given buffer.
public methodReadByte

Supported by the .NET Compact Framework.

Overridden. Reads a byte from the file and advances the read position one byte.
public methodSeek

Supported by the .NET Compact Framework.

Overridden. Sets the current position of this stream to the given value.
public methodSetLength

Supported by the .NET Compact Framework.

Overridden. Sets the length of this stream to the given value.
public methodToString (inherited from Object)

Supported by the .NET Compact Framework.

Returns a String that represents the current Object.
public methodUnlock Allows access by other processes to all or part of a file that was previously locked.
public methodWrite

Supported by the .NET Compact Framework.

Overridden. Writes a block of bytes to this stream using data from a buffer.
public methodWriteByte

Supported by the .NET Compact Framework.

Overridden. Writes a byte to the current position in the file stream.

Protected Methods

protected methodCreateWaitHandle (inherited from Stream)

Supported by the .NET Compact Framework.

Allocates a WaitHandle object.
protected methodDispose

Supported by the .NET Compact Framework.

Releases the unmanaged resources used by the FileStream and optionally releases the managed resources.
protected methodFinalize

Supported by the .NET Compact Framework.

Overridden. Ensures that resources are freed and other cleanup operations are performed when the garbage collector reclaims the FileStream.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object)

Supported by the .NET Compact Framework.

Creates a shallow copy of the current Object.

See Also

FileStream Class | System.IO Namespace

Show:
© 2014 Microsoft