StringReader.Close 方法


關閉 StringReaderCloses the StringReader.

 override void Close();
public override void Close ();
override this.Close : unit -> unit
Public Overrides Sub Close ()


如需建立檔案以及將文字寫入檔案的範例,請參閱如何:將文字寫入檔案。For an example of creating a file and writing text to a file, see How to: Write Text to a File. 如需從檔案讀取文字的範例,請參閱如何:從檔案讀取文字For an example of reading text from a file, see How to: Read Text from a File. 如需讀取和寫入二進位檔案的範例,請參閱如何:讀取和寫入新建立的資料檔案For an example of reading from and writing to a binary file, see How to: Read and Write to a Newly Created Data File.

這個方法會覆寫 TextReader.Close 方法。This method overrides the TextReader.Close method.

這項 Close 的執行會呼叫 Dispose,傳遞 true 值的方法。This implementation of Close calls the Dispose, method passing a true value. 呼叫 Close之後,其他方法可能會擲回例外狀況。Following a call to Close, other methods might throw an exception.