IsAsync Property
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets a value indicating whether the FileStream was opened asynchronously or synchronously.
Namespace: System.IO
Assembly: System.IO (in System.IO.dll)
Syntax
'Declaration
Public Overridable ReadOnly Property IsAsync As Boolean
public virtual bool IsAsync { get; }
public:
virtual property bool IsAsync {
bool get ();
}
abstract IsAsync : bool with get
override IsAsync : bool with get
function get IsAsync () : boolean
Property Value
Type: System. . :: . .Boolean
true if the FileStream was opened asynchronously; otherwise, false.
Remarks
The IsAsync property detects whether the FileStream handle was opened asynchronously, enabling your code to use the Handle property correctly. In Win32, IsAsync being true means the handle was opened for overlapped I/O, and thus requires different parameters to ReadFile and WriteFile.
You specify this value when you create an instance of the FileStream class using a constructor that has an isAsync, useAsync, or options parameter. When the property is true, the stream utilizes overlapped I/O to perform file operations asynchronously.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.