TextReader.Close TextReader.Close TextReader.Close TextReader.Close Method

定義

關閉 TextReader 和釋放任何與 TextReader 相關的系統資源。Closes the TextReader and releases any system resources associated with the TextReader.

public:
 virtual void Close();
public virtual void Close ();
abstract member Close : unit -> unit
override this.Close : unit -> unit
Public Overridable Sub Close ()

備註

這個實作Close呼叫TextReader.Dispose(Boolean)方法並將它傳遞true值。This implementation of Close calls the TextReader.Dispose(Boolean) method and passes it a true value.

注意

在衍生類別中,不會覆寫Close方法。In derived classes, do not override the Close method. 相反地,覆寫TextReader.Dispose(Boolean)加入程式碼,以便釋放資源的方法。Instead, override the TextReader.Dispose(Boolean) method to add code for releasing resources.

適用於

另請參閱