﻿<?xml version="1.0" encoding="utf-8"?><Type Name="StringReader" FullName="System.IO.StringReader" FullNameSP="System_IO_StringReader" Maintainer="ecma"><TypeSignature Language="ILASM" Value=".class public serializable StringReader extends System.IO.TextReader" /><TypeSignature Language="C#" Value="public class StringReader : System.IO.TextReader" /><TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit StringReader extends System.IO.TextReader" /><MemberOfLibrary>BCL</MemberOfLibrary><AssemblyInfo><AssemblyName>mscorlib</AssemblyName><AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement><Base><BaseTypeName>System.IO.TextReader</BaseTypeName></Base><Interfaces></Interfaces><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName></Attribute></Attributes><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The following table lists examples of other typical or related I/O tasks.</para><list type="table"><listheader><item><term><para>To do this... </para></term><description><para>See the example in this topic... </para></description></item></listheader><item><term><para>Create a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Write to a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Read from a text file. </para></term><description><para><format type="text/html"><a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[&lt;topic://cpconreadingtextfromfile&gt;]</a></format></para></description></item><item><term><para>Append text to a file. </para></term><description><para><format type="text/html"><a href="74423362-1721-49CB-AA0A-E04005F72A06">[&lt;topic://cpconopeningappendingtologfile&gt;]</a></format></para><para><see cref="M:System.IO.File.AppendText(System.String)" /></para><para><see cref="M:System.IO.FileInfo.AppendText" /></para></description></item><item><term><para>Get the size of a file. </para></term><description><para><see cref="P:System.IO.FileInfo.Length" /></para></description></item><item><term><para>Get the attributes of a file. </para></term><description><para><see cref="M:System.IO.File.GetAttributes(System.String)" /></para></description></item><item><term><para>Set the attributes of a file. </para></term><description><para><see cref="M:System.IO.File.SetAttributes(System.String,System.IO.FileAttributes)" /></para></description></item><item><term><para>Determine if a file exists. </para></term><description><para><see cref="M:System.IO.File.Exists(System.String)" /></para></description></item><item><term><para>Read from a binary file. </para></term><description><para><format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[&lt;topic://cpconReadingWritingToNewlyCreatedDataFile&gt;]</a></format></para></description></item><item><term><para>Write to a binary file. </para></term><description><para><format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[&lt;topic://cpconReadingWritingToNewlyCreatedDataFile&gt;]</a></format></para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Implements a <see cref="T:System.IO.TextReader" /> that reads from a string.</para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(string s)" /><MemberSignature Language="C#" Value="public StringReader (string s);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string s) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="s" Type="System.String" /></Parameters><Docs><exception cref="T:System.ArgumentNullException"><paramref name="s" /> is <see langword="null" />.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The following table lists examples of other typical or related I/O tasks.</para><list type="table"><listheader><item><term><para>To do this... </para></term><description><para>See the example in this topic... </para></description></item></listheader><item><term><para>Create a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Write to a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Read from a text file. </para></term><description><para><format type="text/html"><a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[&lt;topic://cpconreadingtextfromfile&gt;]</a></format></para></description></item><item><term><para>Append text to a file. </para></term><description><para><format type="text/html"><a href="74423362-1721-49CB-AA0A-E04005F72A06">[&lt;topic://cpconopeningappendingtologfile&gt;]</a></format></para><para><see cref="M:System.IO.File.AppendText(System.String)" /></para><para><see cref="M:System.IO.FileInfo.AppendText" /></para></description></item><item><term><para>Get the size of a file. </para></term><description><para><see cref="P:System.IO.FileInfo.Length" /></para></description></item><item><term><para>Get the attributes of a file. </para></term><description><para><see cref="M:System.IO.File.GetAttributes(System.String)" /></para></description></item><item><term><para>Set the attributes of a file. </para></term><description><para><see cref="M:System.IO.File.SetAttributes(System.String,System.IO.FileAttributes)" /></para></description></item><item><term><para>Determine if a file exists. </para></term><description><para><see cref="M:System.IO.File.Exists(System.String)" /></para></description></item><item><term><para>Read from a binary file. </para></term><description><para><format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[&lt;topic://cpconReadingWritingToNewlyCreatedDataFile&gt;]</a></format></para></description></item><item><term><para>Write to a binary file. </para></term><description><para><format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[&lt;topic://cpconReadingWritingToNewlyCreatedDataFile&gt;]</a></format></para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.IO.StringReader" /> class that reads from the specified string.</para></summary><param name="s"><attribution license="cc4" from="Microsoft" modified="false" />The string to which the <see cref="T:System.IO.StringReader" /> should be initialized. </param></Docs><Excluded>0</Excluded></Member><Member MemberName="Close"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual void Close()" /><MemberSignature Language="C#" Value="public override void Close ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void Close() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>For an example of creating a file and writing text to a file, see <format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format>. For an example of reading text from a file, see <format type="text/html"><a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[&lt;topic://cpconreadingtextfromfile&gt;]</a></format>. For an example of reading from and writing to a binary file, see <format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[&lt;topic://cpconReadingWritingToNewlyCreatedDataFile&gt;]</a></format>.</para><para>This method overrides the <see cref="M:System.IO.Stream.Close" /> method.</para><para>This implementation of Close calls the <see cref="M:System.IO.StringReader.Dispose(System.Boolean)" /> method passing a true value.</para><para>Flushing the stream will not flush its underlying encoder unless you explicitly call Close. Setting <see cref="P:System.IO.StreamWriter.AutoFlush" /> to true means that data will be flushed from the buffer to the stream, but the encoder state will not be flushed. This allows the encoder to keep its state (partial characters) so that it can encode the next block of characters correctly. This scenario affects UTF8 and UTF7 where certain characters can only be encoded after the encoder receives the adjacent character or characters.</para><para>Following a call to Close, other methods might throw an exception.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Closes the <see cref="T:System.IO.StringReader" />.</para></summary></Docs><Excluded>0</Excluded></Member><Member MemberName="Dispose"><MemberSignature Language="ILASM" Value=".method family hidebysig virtual void Dispose(bool disposing)" /><MemberSignature Language="C#" Value="protected override void Dispose (bool disposing);" /><MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Dispose(bool disposing) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="disposing" Type="System.Boolean" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>When the <paramref name="disposing" /> parameter is true, this method releases all resources held by any managed objects that this <see cref="T:System.IO.StringReader" /> references. This method invokes the Dispose method of each referenced object.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Releases the unmanaged resources used by the <see cref="T:System.IO.StringReader" /> and optionally releases the managed resources.</para></summary><param name="disposing"><attribution license="cc4" from="Microsoft" modified="false" />true to release both managed and unmanaged resources; false to release only unmanaged resources. </param></Docs><Excluded>0</Excluded></Member><Member MemberName="Peek"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 Peek()" /><MemberSignature Language="C#" Value="public override int Peek ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 Peek() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters /><Docs><exception cref="T:System.ObjectDisposedException">The current reader is closed.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.IO.StringReader.Peek" /> method returns an integer value in order to determine whether the end of the file, or another error has occurred. This allows a user to first check if the returned value is -1 before casting it to a <see cref="T:System.Char" /> type.</para><para>This method overrides the <see cref="M:System.IO.TextReader.Peek" /> method.</para><para>The current position of the StringReader is not changed by this operation.</para><para>The following table lists examples of other typical or related I/O tasks.</para><list type="table"><listheader><item><term><para>To do this... </para></term><description><para>See the example in this topic... </para></description></item></listheader><item><term><para>Create a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Write to a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Read from a text file. </para></term><description><para><format type="text/html"><a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[&lt;topic://cpconreadingtextfromfile&gt;]</a></format></para></description></item><item><term><para>Get the size of a file. </para></term><description><para><see cref="P:System.IO.FileInfo.Length" /></para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns the next available character but does not consume it.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An integer representing the next character to be read, or -1 if no more characters are available or the stream does not support seeking.</para></returns></Docs><Excluded>0</Excluded></Member><Member MemberName="Read"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 Read()" /><MemberSignature Language="C#" Value="public override int Read ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 Read() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters /><Docs><exception cref="T:System.ObjectDisposedException">The current reader is closed.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This method overrides the <see cref="M:System.IO.TextReader.Read" /> method.</para><para>The following table lists examples of other typical or related I/O tasks.</para><list type="table"><listheader><item><term><para>To do this... </para></term><description><para>See the example in this topic... </para></description></item></listheader><item><term><para>Create a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Write to a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Read from a text file. </para></term><description><para><format type="text/html"><a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[&lt;topic://cpconreadingtextfromfile&gt;]</a></format></para></description></item><item><term><para>Append text to a file. </para></term><description><para><format type="text/html"><a href="74423362-1721-49CB-AA0A-E04005F72A06">[&lt;topic://cpconopeningappendingtologfile&gt;]</a></format></para><para><see cref="M:System.IO.File.AppendText(System.String)" /></para><para><see cref="M:System.IO.FileInfo.AppendText" /></para></description></item><item><term><para>Get the size of a file. </para></term><description><para><see cref="P:System.IO.FileInfo.Length" /></para></description></item><item><term><para>Get the attributes of a file. </para></term><description><para><see cref="M:System.IO.File.GetAttributes(System.String)" /></para></description></item><item><term><para>Set the attributes of a file. </para></term><description><para><see cref="M:System.IO.File.SetAttributes(System.String,System.IO.FileAttributes)" /></para></description></item><item><term><para>Determine if a file exists. </para></term><description><para><see cref="M:System.IO.File.Exists(System.String)" /></para></description></item><item><term><para>Read from a binary file. </para></term><description><para><format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[&lt;topic://cpconReadingWritingToNewlyCreatedDataFile&gt;]</a></format></para></description></item><item><term><para>Write to a binary file. </para></term><description><para><format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[&lt;topic://cpconReadingWritingToNewlyCreatedDataFile&gt;]</a></format></para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Reads the next character from the input string and advances the character position by one character.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The next character from the underlying string, or -1 if no more characters are available.</para></returns></Docs><Excluded>0</Excluded></Member><Member MemberName="Read"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 Read(class System.Char[] buffer, int32 index, int32 count)" /><MemberSignature Language="C#" Value="public override int Read (char[] buffer, int index, int count);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 Read(char[] buffer, int32 index, int32 count) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="buffer" Type="System.Char[]" /><Parameter Name="index" Type="System.Int32" /><Parameter Name="count" Type="System.Int32" /></Parameters><Docs><exception cref="T:System.ArgumentNullException"><paramref name="buffer " /> is <see langword="null" />.</exception><exception cref="T:System.ArgumentException">(<paramref name="index" /> + <paramref name="count" /> ) &gt; <paramref name="buffer" /><see langword="." />Length.</exception><exception cref="T:System.ArgumentOutOfRangeException"><para><paramref name="index " />&lt; 0<paramref name=" " /></para><para><paramref name="-" /> or-</para><para><paramref name="count " /> &lt; 0.</para></exception><exception cref="T:System.ObjectDisposedException">The current reader is closed.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This method overrides <see cref="M:System.IO.TextReader.Read" />.</para><para>The method will read up to <paramref name="count" /> characters from the <see cref="T:System.IO.StringReader" /> into the <paramref name="buffer" /> character array starting at position <paramref name="index" />. Returns the actual number of characters read, or zero if the end of the string has been reached and no characters are read.</para><para>The following table lists examples of other typical or related I/O tasks.</para><list type="table"><listheader><item><term><para>To do this... </para></term><description><para>See the example in this topic... </para></description></item></listheader><item><term><para>Create a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Write to a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Read from a text file. </para></term><description><para><format type="text/html"><a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[&lt;topic://cpconreadingtextfromfile&gt;]</a></format></para></description></item><item><term><para>Append text to a file. </para></term><description><para><format type="text/html"><a href="74423362-1721-49CB-AA0A-E04005F72A06">[&lt;topic://cpconopeningappendingtologfile&gt;]</a></format></para><para><see cref="M:System.IO.File.AppendText(System.String)" /></para><para><see cref="M:System.IO.FileInfo.AppendText" /></para></description></item><item><term><para>Get the size of a file. </para></term><description><para><see cref="P:System.IO.FileInfo.Length" /></para></description></item><item><term><para>Get the attributes of a file. </para></term><description><para><see cref="M:System.IO.File.GetAttributes(System.String)" /></para></description></item><item><term><para>Set the attributes of a file. </para></term><description><para><see cref="M:System.IO.File.SetAttributes(System.String,System.IO.FileAttributes)" /></para></description></item><item><term><para>Determine if a file exists. </para></term><description><para><see cref="M:System.IO.File.Exists(System.String)" /></para></description></item><item><term><para>Read from a binary file. </para></term><description><para><format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[&lt;topic://cpconReadingWritingToNewlyCreatedDataFile&gt;]</a></format></para></description></item><item><term><para>Write to a binary file. </para></term><description><para><format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[&lt;topic://cpconReadingWritingToNewlyCreatedDataFile&gt;]</a></format></para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Reads a block of characters from the input string and advances the character position by <paramref name="count" />.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The total number of characters read into the buffer. This can be less than the number of characters requested if that many characters are not currently available, or zero if the end of the underlying string has been reached.</para></returns><param name="buffer"><attribution license="cc4" from="Microsoft" modified="false" />When this method returns, contains the specified character array with the values between <paramref name="index" /> and (<paramref name="index" /> + <paramref name="count" /> - 1) replaced by the characters read from the current source. </param><param name="index"><attribution license="cc4" from="Microsoft" modified="false" />The starting index in the buffer. </param><param name="count"><attribution license="cc4" from="Microsoft" modified="false" />The number of characters to read. </param></Docs><Excluded>0</Excluded></Member><Member MemberName="ReadAsync"><MemberSignature Language="C#" Value="public override System.Threading.Tasks.Task&lt;int&gt; ReadAsync (char[] buffer, int index, int count);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Threading.Tasks.Task`1&lt;int32&gt; ReadAsync(char[] buffer, int32 index, int32 count) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Threading.Tasks.Task&lt;System.Int32&gt;</ReturnType></ReturnValue><Parameters><Parameter Name="buffer" Type="System.Char[]" /><Parameter Name="index" Type="System.Int32" /><Parameter Name="count" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The task completes after either the number of characters specified by the <paramref name="count" /> parameter are read or the end of the string is reached. </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Reads a specified maximum number of characters from the current string asynchronously and writes the data to a buffer, beginning at the specified index. </para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A task that represents the asynchronous read operation. The value of the <paramref name="TResult" /> parameter contains the total number of bytes read into the buffer. The result value can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the string has been reached.</para></returns><param name="buffer"><attribution license="cc4" from="Microsoft" modified="false" />When this method returns, contains the specified character array with the values between <paramref name="index" /> and (<paramref name="index" /> + <paramref name="count" /> - 1) replaced by the characters read from the current source.</param><param name="index"><attribution license="cc4" from="Microsoft" modified="false" />The position in <paramref name="buffer" /> at which to begin writing.</param><param name="count"><attribution license="cc4" from="Microsoft" modified="false" />The maximum number of characters to read. If the end of the string is reached before the specified number of characters is written into the buffer, the method returns.</param></Docs></Member><Member MemberName="ReadBlockAsync"><MemberSignature Language="C#" Value="public override System.Threading.Tasks.Task&lt;int&gt; ReadBlockAsync (char[] buffer, int index, int count);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Threading.Tasks.Task`1&lt;int32&gt; ReadBlockAsync(char[] buffer, int32 index, int32 count) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Threading.Tasks.Task&lt;System.Int32&gt;</ReturnType></ReturnValue><Parameters><Parameter Name="buffer" Type="System.Char[]" /><Parameter Name="index" Type="System.Int32" /><Parameter Name="count" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The task does not complete until either the number of characters specified by the <paramref name="count" /> parameter are read, or the end of the string has been reached.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Reads a specified maximum number of characters from the current string asynchronously and writes the data to a buffer, beginning at the specified index.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A task that represents the asynchronous read operation. The value of the <paramref name="TResult" /> parameter contains the total number of bytes read into the buffer. The result value can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the string has been reached.</para></returns><param name="buffer"><attribution license="cc4" from="Microsoft" modified="false" />When this method returns, contains the specified character array with the values between <paramref name="index" /> and (<paramref name="index" /> + <paramref name="count" /> - 1) replaced by the characters read from the current source.</param><param name="index"><attribution license="cc4" from="Microsoft" modified="false" />The position in <paramref name="buffer" /> at which to begin writing.</param><param name="count"><attribution license="cc4" from="Microsoft" modified="false" />The maximum number of characters to read. If the end of the string is reached before the specified number of characters is written into the buffer, the method returns.</param></Docs></Member><Member MemberName="ReadLine"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual string ReadLine()" /><MemberSignature Language="C#" Value="public override string ReadLine ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ReadLine() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.String</ReturnType></ReturnValue><Parameters /><Docs><exception cref="T:System.ObjectDisposedException">The current reader is closed.</exception><exception cref="T:System.OutOfMemoryException">There is insufficient memory to allocate a buffer for the returned string.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This method overrides the <see cref="M:System.IO.TextReader.ReadLine" /> method.</para><para>A line is defined as a sequence of characters followed by a line feed ("\n"), a carriage return ("\r"), or a carriage return immediately followed by a line feed ("\r\n"). The string that is returned does not contain the terminating carriage return or line feed. The returned value is null if the end of the string has been reached.</para><para>If the current method throws an <see cref="T:System.OutOfMemoryException" />, the reader's position in the underlying string is advanced by the number of characters the method was able to read, but the characters already read into the internal <see cref="M:System.IO.StringReader.ReadLine" /> buffer are discarded. Because the position of the reader in the string cannot be changed, the characters already read are unrecoverable, and can be accessed only by reinitializing the <see cref="T:System.IO.StringReader" />. To avoid such a situation, use the <see cref="M:System.IO.StringReader.Read" /> method and store the read characters in a preallocated buffer.</para><para>The following table lists examples of other typical or related I/O tasks.</para><list type="table"><listheader><item><term><para>To do this... </para></term><description><para>See the example in this topic... </para></description></item></listheader><item><term><para>Create a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Write to a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Read from a text file. </para></term><description><para><format type="text/html"><a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[&lt;topic://cpconreadingtextfromfile&gt;]</a></format></para></description></item><item><term><para>Append text to a file. </para></term><description><para><format type="text/html"><a href="74423362-1721-49CB-AA0A-E04005F72A06">[&lt;topic://cpconopeningappendingtologfile&gt;]</a></format></para><para><see cref="M:System.IO.File.AppendText(System.String)" /></para><para><see cref="M:System.IO.FileInfo.AppendText" /></para></description></item><item><term><para>Get the size of a file. </para></term><description><para><see cref="P:System.IO.FileInfo.Length" /></para></description></item><item><term><para>Get the attributes of a file. </para></term><description><para><see cref="M:System.IO.File.GetAttributes(System.String)" /></para></description></item><item><term><para>Set the attributes of a file. </para></term><description><para><see cref="M:System.IO.File.SetAttributes(System.String,System.IO.FileAttributes)" /></para></description></item><item><term><para>Determine if a file exists. </para></term><description><para><see cref="M:System.IO.File.Exists(System.String)" /></para></description></item><item><term><para>Read from a binary file. </para></term><description><para><format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[&lt;topic://cpconReadingWritingToNewlyCreatedDataFile&gt;]</a></format></para></description></item><item><term><para>Write to a binary file. </para></term><description><para><format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[&lt;topic://cpconReadingWritingToNewlyCreatedDataFile&gt;]</a></format></para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Reads a line of characters from the current string and returns the data as a string.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The next line from the current string, or null if the end of the string is reached.</para></returns></Docs><Excluded>0</Excluded></Member><Member MemberName="ReadLineAsync"><MemberSignature Language="C#" Value="public override System.Threading.Tasks.Task&lt;string&gt; ReadLineAsync ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Threading.Tasks.Task`1&lt;string&gt; ReadLineAsync() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Threading.Tasks.Task&lt;System.String&gt;</ReturnType></ReturnValue><Parameters /><Docs><remarks>To be added.</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Reads a line of characters asynchronously from the current string and returns the data as a string.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A task that represents the asynchronous read operation. The value of the <paramref name="TResult" /> parameter contains the next line from the string reader, or is null if all the characters have been read.</para></returns></Docs></Member><Member MemberName="ReadToEnd"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual string ReadToEnd()" /><MemberSignature Language="C#" Value="public override string ReadToEnd ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ReadToEnd() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.String</ReturnType></ReturnValue><Parameters /><Docs><exception cref="T:System.ObjectDisposedException">The current reader is closed.</exception><exception cref="T:System.OutOfMemoryException">There is insufficient memory to allocate a buffer for the returned string.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This method overrides the <see cref="M:System.IO.TextReader.ReadToEnd" /> method.</para><para>If the current method throws an <see cref="T:System.OutOfMemoryException" />, the reader's position in the underlying string is advanced by the number of characters the method was able to read, but the characters already read into the internal <see cref="M:System.IO.StringReader.ReadToEnd" /> buffer are discarded. Because the position of the reader in the string cannot be changed, the characters already read are unrecoverable, and can be accessed only by reinitializing the <see cref="T:System.IO.StringReader" />. To avoid such a situation, use the <see cref="M:System.IO.StringReader.Read" /> method and store the read characters in a preallocated buffer.</para><para>The following table lists examples of other typical or related I/O tasks.</para><list type="table"><listheader><item><term><para>To do this... </para></term><description><para>See the example in this topic... </para></description></item></listheader><item><term><para>Create a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Write to a text file. </para></term><description><para><format type="text/html"><a href="060CBE06-2ADF-4337-9E7B-961A5C840208">[&lt;topic://cpconwritingtexttofile&gt;]</a></format></para></description></item><item><term><para>Read from a text file. </para></term><description><para><format type="text/html"><a href="ED180BAA-DFC6-4C69-A725-46E87EDAFB27">[&lt;topic://cpconreadingtextfromfile&gt;]</a></format></para></description></item><item><term><para>Append text to a file. </para></term><description><para><format type="text/html"><a href="74423362-1721-49CB-AA0A-E04005F72A06">[&lt;topic://cpconopeningappendingtologfile&gt;]</a></format></para><para><see cref="M:System.IO.File.AppendText(System.String)" /></para><para><see cref="M:System.IO.FileInfo.AppendText" /></para></description></item><item><term><para>Get the size of a file. </para></term><description><para><see cref="P:System.IO.FileInfo.Length" /></para></description></item><item><term><para>Get the attributes of a file. </para></term><description><para><see cref="M:System.IO.File.GetAttributes(System.String)" /></para></description></item><item><term><para>Set the attributes of a file. </para></term><description><para><see cref="M:System.IO.File.SetAttributes(System.String,System.IO.FileAttributes)" /></para></description></item><item><term><para>Determine if a file exists. </para></term><description><para><see cref="M:System.IO.File.Exists(System.String)" /></para></description></item><item><term><para>Read from a binary file. </para></term><description><para><format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[&lt;topic://cpconReadingWritingToNewlyCreatedDataFile&gt;]</a></format></para></description></item><item><term><para>Write to a binary file. </para></term><description><para><format type="text/html"><a href="E209D949-31E8-44EA-8E38-87F9093F3093">[&lt;topic://cpconReadingWritingToNewlyCreatedDataFile&gt;]</a></format></para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Reads all characters from the current position to the end of the string and returns them as a single string.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The content from the current position to the end of the underlying string.</para></returns></Docs><Excluded>0</Excluded></Member><Member MemberName="ReadToEndAsync"><MemberSignature Language="C#" Value="public override System.Threading.Tasks.Task&lt;string&gt; ReadToEndAsync ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Threading.Tasks.Task`1&lt;string&gt; ReadToEndAsync() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Threading.Tasks.Task&lt;System.String&gt;</ReturnType></ReturnValue><Parameters /><Docs><remarks>To be added.</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Reads all characters from the current position to the end of the string asynchronously and returns them as a single string.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A task that represents the asynchronous read operation. The value of the <paramref name="TResult" /> parameter contains a string with the characters from the current position to the end of the string. </para></returns></Docs></Member></Members><TypeExcluded>0</TypeExcluded></Type>