TextReader.Synchronized Method (TextReader)
.NET Framework (current version)
Creates a thread-safe wrapper around the specified TextReader.
Assembly: mscorlib (in mscorlib.dll)
<HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization := True)> Public Shared Function Synchronized ( reader As TextReader ) As TextReader
Parameters
- reader
-
Type:
System.IO.TextReader
The TextReader to synchronize.
| Exception | Condition |
|---|---|
| ArgumentNullException | reader is null. |
The current method returns a class that wraps around the specified TextReader instance and restricts access to it by multiple threads. All reads from the returned wrapper will be thread safe.
.NET Framework
Available since 1.1
Available since 1.1
Show: