TextReader.Synchronized(TextReader) TextReader.Synchronized(TextReader) TextReader.Synchronized(TextReader) TextReader.Synchronized(TextReader) Method

定義

在指定的 TextReader 內建立安全執行緒的包裝函式。Creates a thread-safe wrapper around the specified TextReader.

public:
 static System::IO::TextReader ^ Synchronized(System::IO::TextReader ^ reader);
public static System.IO.TextReader Synchronized (System.IO.TextReader reader);
static member Synchronized : System.IO.TextReader -> System.IO.TextReader
Public Shared Function Synchronized (reader As TextReader) As TextReader

參數

reader
TextReader TextReader TextReader TextReader

要同步處理的 TextReaderThe TextReader to synchronize.

傳回

安全執行緒的 TextReaderA thread-safe TextReader.

例外狀況

備註

目前的方法會傳回包裝指定TextReader之實例的類別,並限制多個執行緒對它的存取。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.

適用於

另請參閱