﻿<?xml version="1.0" encoding="utf-8"?><Type Name="ASCIIEncoding" FullName="System.Text.ASCIIEncoding" FullNameSP="System_Text_ASCIIEncoding" Maintainer="ecma"><TypeSignature Language="ILASM" Value=".class public serializable ASCIIEncoding extends System.Text.Encoding" /><TypeSignature Language="C#" Value="public class ASCIIEncoding : System.Text.Encoding" /><TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit ASCIIEncoding extends System.Text.Encoding" /><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.Text.Encoding</BaseTypeName></Base><Interfaces /><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName></Attribute></Attributes><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Encoding is the process of transforming a set of Unicode characters into a sequence of bytes. Decoding is the process of transforming a sequence of encoded bytes into a set of Unicode characters.</para><para><see cref="T:System.Text.ASCIIEncoding" /> corresponds to the Windows code page 20127. Because ASCII is a 7-bit encoding, ASCII characters are limited to the lowest 128 Unicode characters, from U+0000 to U+007F. If you use the default encoder returned by the <see cref="P:System.Text.Encoding.ASCII" /> property or the <see cref="M:System.Text.ASCIIEncoding.#ctor" /> constructor, characters outside that range are replaced with a question mark (?) before the encoding operation is performed.  Because the <see cref="T:System.Text.ASCIIEncoding" /> class supports only a limited character set, the <see cref="T:System.Text.UTF8Encoding" />, <see cref="T:System.Text.UnicodeEncoding" />, and <see cref="T:System.Text.UTF32Encoding" /> classes are better suited for globalized applications. The following considerations can help you to decide whether to use <see cref="T:System.Text.ASCIIEncoding" />:</para><list type="bullet"><item><para>Some protocols require ASCII or a subset of ASCII. In these cases ASCII encoding is appropriate.</para></item><item><para>If an 8-bit encoding is expected, then ASCII probably isn't the correct choice. Instead, consider using UTF8 instead of ASCII. For the characters U+0000 through U+007F, the results are identical, but all Unicode characters are representable in UTF-8, which avoids data loss.</para></item></list><block subset="none" type="note"><para><see cref="T:System.Text.ASCIIEncoding" /> does not provide error detection. For security reasons, you should use <see cref="T:System.Text.UTF8Encoding" />, <see cref="T:System.Text.UnicodeEncoding" />, or <see cref="T:System.Text.UTF32Encoding" /> and enable error detection.</para></block><para>The <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method determines how many bytes result in encoding a set of Unicode characters, and the <see cref="M:System.Text.ASCIIEncoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> method performs the actual encoding.</para><para>Likewise, the <see cref="M:System.Text.ASCIIEncoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" /> method determines how many characters result in decoding a sequence of bytes, and the <see cref="M:System.Text.ASCIIEncoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> and <see cref="M:System.Text.ASCIIEncoding.GetString(System.Byte[],System.Int32,System.Int32)" /> methods perform the actual decoding.</para><para>Note that the default <see cref="T:System.Text.ASCIIEncoding" /> constructor by itself might not have the appropriate behavior for your application. You might want to consider setting the <see cref="P:System.Text.Encoding.EncoderFallback" /> or <see cref="P:System.Text.Encoding.DecoderFallback" /> property to <see cref="T:System.Text.EncoderExceptionFallback" /> or <see cref="T:System.Text.DecoderExceptionFallback" /> to prevent sequences with the 8th bit set. Custom behavior might also be appropriate for these cases.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Represents an ASCII character encoding of Unicode characters.</para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor()" /><MemberSignature Language="C#" Value="public ASCIIEncoding ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() 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 /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><block subset="none" type="note"><para>The <see cref="T:System.Text.ASCIIEncoding" /> class does not provide error detection. For security reasons, you should use the <see cref="T:System.Text.UTF8Encoding" />, <see cref="T:System.Text.UnicodeEncoding" />, or <see cref="T:System.Text.UTF32Encoding" /> class and enable error detection.</para></block><para>If you choose to use ASCII encoding, this constructor may not provide the appropriate fallback behavior for your application. It uses the <see cref="T:System.Text.EncoderReplacementFallback" /> and <see cref="T:System.Text.DecoderReplacementFallback" /> classes to replace every character outside the range of U+0000 through U+007F with a question mark (?). Instead, you can call the <see cref="M:System.Text.Encoding.GetEncoding(System.Int32,System.Text.EncoderFallback,System.Text.DecoderFallback)" /> or <see cref="M:System.Text.Encoding.GetEncoding(System.String,System.Text.EncoderFallback,System.Text.DecoderFallback)" /> method and pass it <see cref="T:System.Text.EncoderExceptionFallback" /> and <see cref="T:System.Text.DecoderExceptionFallback" /> objects to use exception fallback.</para><block subset="none" type="note"><para><see cref="T:System.Text.ASCIIEncoding" /> supports only the Unicode character values between U+0000 and U+007F. Therefore, <see cref="T:System.Text.UTF8Encoding" />, <see cref="T:System.Text.UnicodeEncoding" />, and <see cref="T:System.Text.UTF32Encoding" /> are better suited for globalized applications.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Text.ASCIIEncoding" /> class.</para></summary></Docs><Excluded>0</Excluded></Member><Member MemberName="GetByteCount"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 GetByteCount(string chars)" /><MemberSignature Language="C#" Value="public override int GetByteCount (string chars);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetByteCount(string chars) 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="chars" Type="System.String" /></Parameters><Docs><exception cref="T:System.ArgumentNullException"><paramref name="chars " />is <see langword="null" />. </exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>To calculate the exact array size required by <see cref="M:System.Text.ASCIIEncoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> to store the resulting bytes, the application uses <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" />. The <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Calculates the number of bytes produced by encoding the characters in the specified <see cref="T:System.String" />.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The number of bytes produced by encoding the specified characters.</para></returns><param name="chars"><attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.String" /> containing the set of characters to encode.</param></Docs><Excluded>0</Excluded></Member><Member MemberName="GetByteCount"><MemberSignature Language="C#" Value="public override int GetByteCount (char* chars, int count);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetByteCount(char* chars, int32 count) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.CLSCompliant(false)</AttributeName></Attribute><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="chars" Type="System.Char*" /><Parameter Name="count" Type="System.Int32" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>To calculate the exact array size required by <see cref="M:System.Text.ASCIIEncoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> to store the resulting bytes, the application uses <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" />. The <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Calculates the number of bytes produced by encoding a set of characters starting at the specified character pointer.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The number of bytes produced by encoding the specified characters.</para></returns><param name="chars"><attribution license="cc4" from="Microsoft" modified="false" />A pointer to the first character to encode.</param><param name="count"><attribution license="cc4" from="Microsoft" modified="false" />The number of characters to encode.</param></Docs></Member><Member MemberName="GetByteCount"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 GetByteCount(class System.Char[] chars, int32 index, int32 count)" /><MemberSignature Language="C#" Value="public override int GetByteCount (char[] chars, int index, int count);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetByteCount(char[] chars, 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="chars" Type="System.Char[]" /><Parameter Name="index" Type="System.Int32" /><Parameter Name="count" Type="System.Int32" /></Parameters><Docs><exception cref="T:System.ArgumentNullException"><paramref name="chars " /> is <see langword="null" />. </exception><exception cref="T:System.ArgumentOutOfRangeException"><para><paramref name=" index " /> &lt; 0.</para><para> -or-</para><para><paramref name="count" /> &lt; 0. </para><para> -or- </para><para><paramref name="index" /> and <paramref name=" count" /> do not specify a valid range in <paramref name=" chars" /> (i.e. (<paramref name=" index" /> + <paramref name="count" /> - 1) &gt; <paramref name="chars" />.Length).</para></exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>To calculate the exact array size required by <see cref="M:System.Text.ASCIIEncoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> to store the resulting bytes, the application uses <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" />. The <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Calculates the number of bytes produced by encoding a set of characters from the specified character array.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The number of bytes produced by encoding the specified characters.</para></returns><param name="chars"><attribution license="cc4" from="Microsoft" modified="false" />The character array containing the set of characters to encode.</param><param name="index"><attribution license="cc4" from="Microsoft" modified="false" />The index of the first character to encode.</param><param name="count"><attribution license="cc4" from="Microsoft" modified="false" />The number of characters to encode.</param></Docs><Excluded>0</Excluded></Member><Member MemberName="GetBytes"><MemberSignature Language="C#" Value="public override int GetBytes (char* chars, int charCount, byte* bytes, int byteCount);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetBytes(char* chars, int32 charCount, unsigned int8* bytes, int32 byteCount) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.CLSCompliant(false)</AttributeName></Attribute><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="chars" Type="System.Char*" /><Parameter Name="charCount" Type="System.Int32" /><Parameter Name="bytes" Type="System.Byte*" /><Parameter Name="byteCount" Type="System.Int32" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>To calculate the exact array size required by <see cref="M:System.Text.ASCIIEncoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> to store the resulting bytes, the application uses <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" />. The <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para><para>Data to be converted, such as data read from a stream, can be available only in sequential blocks. In this case, or if the amount of data is so large that it needs to be divided into smaller blocks, the application should use the <see cref="T:System.Text.Decoder" /> or the <see cref="T:System.Text.Encoder" /> provided by the <see cref="M:System.Text.ASCIIEncoding.GetDecoder" /> method or the <see cref="M:System.Text.ASCIIEncoding.GetEncoder" /> method, respectively.</para><para><see cref="T:System.Text.ASCIIEncoding" /> does not provide error detection. Any Unicode character greater than U+007F is translated to an ASCII question mark ("?").</para><block subset="none" type="note"><para>For security reasons, your application is recommended to use <see cref="T:System.Text.UTF8Encoding" />, <see cref="T:System.Text.UnicodeEncoding" />, or <see cref="T:System.Text.UTF32Encoding" /> and enable error detection.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Encodes a set of characters starting at the specified character pointer into a sequence of bytes that are stored starting at the specified byte pointer.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The actual number of bytes written at the location indicated by <paramref name="bytes" />.</para></returns><param name="chars"><attribution license="cc4" from="Microsoft" modified="false" />A pointer to the first character to encode.</param><param name="charCount"><attribution license="cc4" from="Microsoft" modified="false" />The number of characters to encode.</param><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />A pointer to the location at which to start writing the resulting sequence of bytes.</param><param name="byteCount"><attribution license="cc4" from="Microsoft" modified="false" />The maximum number of bytes to write.</param></Docs></Member><Member MemberName="GetBytes"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 GetBytes(class System.Char[] chars, int32 charIndex, int32 charCount, class System.Byte[] bytes, int32 byteIndex)" /><MemberSignature Language="C#" Value="public override int GetBytes (char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetBytes(char[] chars, int32 charIndex, int32 charCount, unsigned int8[] bytes, int32 byteIndex) 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="chars" Type="System.Char[]" /><Parameter Name="charIndex" Type="System.Int32" /><Parameter Name="charCount" Type="System.Int32" /><Parameter Name="bytes" Type="System.Byte[]" /><Parameter Name="byteIndex" Type="System.Int32" /></Parameters><Docs><exception cref="T:System.ArgumentException"><para>(<paramref name="bytes" />.Length - <paramref name="byteIndex" />) &lt; <paramref name="charCount" />.</para></exception><exception cref="T:System.ArgumentNullException"><para><paramref name="chars" /> is <see langword="null" />.</para><para>-or-</para><para><paramref name="bytes" /> is <see langword="null" />. </para></exception><exception cref="T:System.ArgumentOutOfRangeException"><para><paramref name="charIndex" /> &lt; 0.</para><para>-or-</para><para><paramref name="charCount" /> &lt; 0.</para><para>-or-</para><para>(<paramref name="chars" />.Length - <paramref name="charIndex" />) &lt; <paramref name="charCount" />.</para><para>-or-</para><para><paramref name=" byteIndex" /> &lt; 0.</para><para>-or-</para><para><paramref name="byteIndex" /> &gt; <paramref name="bytes" />.Length.</para></exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>To calculate the exact array size required by <see cref="M:System.Text.ASCIIEncoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> to store the resulting bytes, the application uses <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" />. The <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para><para>Data to be converted, such as data read from a stream, can be available only in sequential blocks. In this case, or if the amount of data is so large that it needs to be divided into smaller blocks, the application should use the <see cref="T:System.Text.Decoder" /> or the <see cref="T:System.Text.Encoder" /> provided by the <see cref="M:System.Text.ASCIIEncoding.GetDecoder" /> method or the <see cref="M:System.Text.ASCIIEncoding.GetEncoder" /> method, respectively.</para><para><see cref="T:System.Text.ASCIIEncoding" /> does not provide error detection. Any Unicode character greater than U+007F is encoded as the ASCII question mark ("?").</para><block subset="none" type="note"><para>For security reasons, your application is recommended to use <see cref="T:System.Text.UTF8Encoding" />, <see cref="T:System.Text.UnicodeEncoding" />, or <see cref="T:System.Text.UTF32Encoding" /> and enable error detection.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Encodes a set of characters from the specified character array into the specified byte array.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The actual number of bytes written into <paramref name="bytes" />.</para></returns><param name="chars"><attribution license="cc4" from="Microsoft" modified="false" />The character array containing the set of characters to encode.</param><param name="charIndex"><attribution license="cc4" from="Microsoft" modified="false" />The index of the first character to encode.</param><param name="charCount"><attribution license="cc4" from="Microsoft" modified="false" />The number of characters to encode.</param><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The byte array to contain the resulting sequence of bytes.</param><param name="byteIndex"><attribution license="cc4" from="Microsoft" modified="false" />The index at which to start writing the resulting sequence of bytes.</param></Docs><Excluded>0</Excluded></Member><Member MemberName="GetBytes"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 GetBytes(string chars, int32 charIndex, int32 charCount, class System.Byte[] bytes, int32 byteIndex)" /><MemberSignature Language="C#" Value="public override int GetBytes (string chars, int charIndex, int charCount, byte[] bytes, int byteIndex);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetBytes(string chars, int32 charIndex, int32 charCount, unsigned int8[] bytes, int32 byteIndex) 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="chars" Type="System.String" /><Parameter Name="charIndex" Type="System.Int32" /><Parameter Name="charCount" Type="System.Int32" /><Parameter Name="bytes" Type="System.Byte[]" /><Parameter Name="byteIndex" Type="System.Int32" /></Parameters><Docs><exception cref="T:System.ArgumentException"><para>(<paramref name="bytes" />.Length - <paramref name="byteIndex" />) &lt; <paramref name="charCount" />.</para></exception><exception cref="T:System.ArgumentNullException"><para><paramref name="chars " /> is <see langword="null" />.</para><para>-or-</para><para><paramref name="bytes" /> is <see langword="null" />.</para></exception><exception cref="T:System.ArgumentOutOfRangeException"><para><paramref name="charIndex" /> &lt; 0.</para><para>-or-</para><para><paramref name="charCount " /> &lt; 0.</para><para>-or-</para><para>(<paramref name="chars" />.Length - <paramref name="charIndex" />) &lt; <paramref name="charCount" />.</para><para>-or-</para><para><paramref name="byteIndex " /> &lt; 0.</para><para>-or-</para><para><paramref name="byteIndex " /> &gt;= <paramref name="bytes" />.Length.</para></exception><param name="charIndex"><attribution license="cc4" from="Microsoft" modified="false" />The index of the first character to encode.</param><param name="charCount"><attribution license="cc4" from="Microsoft" modified="false" />The number of characters to encode.</param><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The byte array to contain the resulting sequence of bytes.</param><param name="byteIndex"><attribution license="cc4" from="Microsoft" modified="false" />The index at which to start writing the resulting sequence of bytes.</param><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>To calculate the exact array size required by <see cref="M:System.Text.ASCIIEncoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> to store the resulting bytes, the application uses <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" />. The <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para><para>Data to be converted, such as data read from a stream, can be available only in sequential blocks. In this case, or if the amount of data is so large that it needs to be divided into smaller blocks, the application should use the <see cref="T:System.Text.Decoder" /> or the <see cref="T:System.Text.Encoder" /> provided by the <see cref="M:System.Text.ASCIIEncoding.GetDecoder" /> method or the <see cref="M:System.Text.ASCIIEncoding.GetEncoder" /> method, respectively.</para><para><see cref="T:System.Text.ASCIIEncoding" /> does not provide error detection. Any Unicode character greater than U+007F is encoded as the ASCII question mark ("?").</para><block subset="none" type="note"><para>For security reasons, your application is recommended to use <see cref="T:System.Text.UTF8Encoding" />, <see cref="T:System.Text.UnicodeEncoding" />, or <see cref="T:System.Text.UTF32Encoding" /> and enable error detection.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Encodes a set of characters from the specified <see cref="T:System.String" /> into the specified byte array.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The actual number of bytes written into <paramref name="bytes" />.</para></returns><param name="chars"><attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.String" /> containing the set of characters to encode.</param><param name="charIndex"><attribution license="cc4" from="Microsoft" modified="false" />The index of the first character to encode.</param><param name="charCount"><attribution license="cc4" from="Microsoft" modified="false" />The number of characters to encode.</param><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The byte array to contain the resulting sequence of bytes.</param><param name="byteIndex"><attribution license="cc4" from="Microsoft" modified="false" />The index at which to start writing the resulting sequence of bytes.</param></Docs><Excluded>0</Excluded></Member><Member MemberName="GetCharCount"><MemberSignature Language="C#" Value="public override int GetCharCount (byte* bytes, int count);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetCharCount(unsigned int8* bytes, int32 count) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.CLSCompliant(false)</AttributeName></Attribute><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="bytes" Type="System.Byte*" /><Parameter Name="count" Type="System.Int32" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>To calculate the exact array size required by <see cref="M:System.Text.ASCIIEncoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> to store the resulting characters, the application uses <see cref="M:System.Text.ASCIIEncoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" />. The <see cref="M:System.Text.ASCIIEncoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" /> method generally executes faster.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Calculates the number of characters produced by decoding a sequence of bytes starting at the specified byte pointer.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The number of characters produced by decoding the specified sequence of bytes.</para></returns><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />A pointer to the first byte to decode.</param><param name="count"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to decode.</param></Docs></Member><Member MemberName="GetCharCount"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 GetCharCount(class System.Byte[] bytes, int32 index, int32 count)" /><MemberSignature Language="C#" Value="public override int GetCharCount (byte[] bytes, int index, int count);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetCharCount(unsigned int8[] bytes, 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="bytes" Type="System.Byte[]" /><Parameter Name="index" Type="System.Int32" /><Parameter Name="count" Type="System.Int32" /></Parameters><Docs><exception cref="T:System.ArgumentNullException"><paramref name="bytes" /> is <see langword="null" />.</exception><exception cref="T:System.ArgumentOutOfRangeException"><para><paramref name="index" /> &lt; 0. </para><para>-or-</para><para><paramref name="count" /> &lt; 0. </para><para>-or-</para><para>(<paramref name="bytes" />.Length - <paramref name="index" />) &lt; <paramref name="count" />.</para></exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>To calculate the exact array size required by <see cref="M:System.Text.ASCIIEncoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> to store the resulting characters, the application uses <see cref="M:System.Text.ASCIIEncoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" />. The <see cref="M:System.Text.ASCIIEncoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" /> method generally executes faster.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The number of characters produced by decoding the specified sequence of bytes.</para></returns><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The byte array containing the sequence of bytes to decode.</param><param name="index"><attribution license="cc4" from="Microsoft" modified="false" />The index of the first byte to decode.</param><param name="count"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to decode.</param></Docs><Excluded>0</Excluded></Member><Member MemberName="GetChars"><MemberSignature Language="C#" Value="public override int GetChars (byte* bytes, int byteCount, char* chars, int charCount);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetChars(unsigned int8* bytes, int32 byteCount, char* chars, int32 charCount) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.CLSCompliant(false)</AttributeName></Attribute><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="bytes" Type="System.Byte*" /><Parameter Name="byteCount" Type="System.Int32" /><Parameter Name="chars" Type="System.Char*" /><Parameter Name="charCount" Type="System.Int32" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>To calculate the exact array size required by <see cref="M:System.Text.ASCIIEncoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> to store the resulting characters, the application uses <see cref="M:System.Text.ASCIIEncoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" />. The <see cref="M:System.Text.ASCIIEncoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" /> method generally executes faster.</para><para>Data to be converted, such as data read from a stream, can be available only in sequential blocks. In this case, or if the amount of data is so large that it needs to be divided into smaller blocks, the application should use the <see cref="T:System.Text.Decoder" /> or the <see cref="T:System.Text.Encoder" /> provided by the <see cref="M:System.Text.ASCIIEncoding.GetDecoder" /> method or the <see cref="M:System.Text.ASCIIEncoding.GetEncoder" /> method, respectively.</para><para><see cref="T:System.Text.ASCIIEncoding" /> does not provide error detection. Any byte greater than hexadecimal 0x7F is decoded as the Unicode question mark ("?").</para><block subset="none" type="note"><para>For security reasons, your application is recommended to use <see cref="T:System.Text.UTF8Encoding" />, <see cref="T:System.Text.UnicodeEncoding" />, or <see cref="T:System.Text.UTF32Encoding" /> and enable error detection.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Decodes a sequence of bytes starting at the specified byte pointer into a set of characters that are stored starting at the specified character pointer.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The actual number of characters written at the location indicated by <paramref name="chars" />.</para></returns><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />A pointer to the first byte to decode.</param><param name="byteCount"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to decode.</param><param name="chars"><attribution license="cc4" from="Microsoft" modified="false" />A pointer to the location at which to start writing the resulting set of characters.</param><param name="charCount"><attribution license="cc4" from="Microsoft" modified="false" />The maximum number of characters to write.</param></Docs></Member><Member MemberName="GetChars"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 GetChars(class System.Byte[] bytes, int32 byteIndex, int32 byteCount, class System.Char[] chars, int32 charIndex)" /><MemberSignature Language="C#" Value="public override int GetChars (byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetChars(unsigned int8[] bytes, int32 byteIndex, int32 byteCount, char[] chars, int32 charIndex) 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="bytes" Type="System.Byte[]" /><Parameter Name="byteIndex" Type="System.Int32" /><Parameter Name="byteCount" Type="System.Int32" /><Parameter Name="chars" Type="System.Char[]" /><Parameter Name="charIndex" Type="System.Int32" /></Parameters><Docs><exception cref="T:System.ArgumentException"><para>(<paramref name="chars" />.Length - <paramref name="charIndex" />) &lt; <paramref name="byteCount" />.</para></exception><exception cref="T:System.ArgumentNullException"><para><paramref name="bytes " /> is <see langword="null" />. </para><para>-or-</para><para><paramref name="chars " /> is <see langword="null" />. </para></exception><exception cref="T:System.ArgumentOutOfRangeException"><para><paramref name="byteIndex" /> &lt; 0. </para><para> -or- </para><para><paramref name="byteCount " /> &lt; 0. </para><para> -or- </para><para>(<paramref name="bytes" />.Length - <paramref name="byteIndex" />) &lt; <paramref name="byteCount" />.</para><para>-or-</para><para><paramref name="charIndex " /> &lt; 0. </para><para> -or- </para><para><paramref name="charIndex " /> &gt; <paramref name="chars" />.Length. </para></exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>To calculate the exact array size required by <see cref="M:System.Text.ASCIIEncoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> to store the resulting characters, the application uses <see cref="M:System.Text.ASCIIEncoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" />. The <see cref="M:System.Text.ASCIIEncoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" /> method generally executes faster.</para><para>Data to be converted, such as data read from a stream, can be available only in sequential blocks. In this case, or if the amount of data is so large that it needs to be divided into smaller blocks, the application should use the <see cref="T:System.Text.Decoder" /> or the <see cref="T:System.Text.Encoder" /> provided by the <see cref="M:System.Text.ASCIIEncoding.GetDecoder" /> method or the <see cref="M:System.Text.ASCIIEncoding.GetEncoder" /> method, respectively.</para><para><see cref="T:System.Text.ASCIIEncoding" /> does not provide error detection. Any byte greater than hexadecimal 0x7F is decoded as the Unicode question mark ("?").</para><block subset="none" type="note"><para>For security reasons, your application is recommended to use <see cref="T:System.Text.UTF8Encoding" />, <see cref="T:System.Text.UnicodeEncoding" />, or <see cref="T:System.Text.UTF32Encoding" /> and enable error detection.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Decodes a sequence of bytes from the specified byte array into the specified character array.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The actual number of characters written into <paramref name="chars" />.</para></returns><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The byte array containing the sequence of bytes to decode.</param><param name="byteIndex"><attribution license="cc4" from="Microsoft" modified="false" />The index of the first byte to decode.</param><param name="byteCount"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to decode.</param><param name="chars"><attribution license="cc4" from="Microsoft" modified="false" />The character array to contain the resulting set of characters.</param><param name="charIndex"><attribution license="cc4" from="Microsoft" modified="false" />The index at which to start writing the resulting set of characters.</param></Docs><Excluded>0</Excluded></Member><Member MemberName="GetDecoder"><MemberSignature Language="C#" Value="public override System.Text.Decoder GetDecoder ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Text.Decoder GetDecoder() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Text.Decoder</ReturnType></ReturnValue><Parameters /><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Text.Decoder.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> method converts sequential blocks of bytes into sequential blocks of characters, in a manner similar to the <see cref="M:System.Text.ASCIIEncoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> method of this class. However, a <see cref="T:System.Text.Decoder" /> maintains state information between calls so it can correctly decode byte sequences that span blocks. The <see cref="T:System.Text.Decoder" /> also preserves trailing bytes at the end of data blocks and uses the trailing bytes in the next decoding operation. Therefore, <see cref="M:System.Text.ASCIIEncoding.GetDecoder" /> and <see cref="M:System.Text.ASCIIEncoding.GetEncoder" /> are useful for network transmission and file operations, because those operations often deal with blocks of data instead of a complete data stream.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Obtains a decoder that converts an ASCII encoded sequence of bytes into a sequence of Unicode characters.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A <see cref="T:System.Text.Decoder" /> that converts an ASCII encoded sequence of bytes into a sequence of Unicode characters.</para></returns></Docs></Member><Member MemberName="GetEncoder"><MemberSignature Language="C#" Value="public override System.Text.Encoder GetEncoder ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.Text.Encoder GetEncoder() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Text.Encoder</ReturnType></ReturnValue><Parameters /><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Text.Encoder.GetBytes(System.Char[],System.Int32,System.Int32,System.Byte[],System.Int32,System.Boolean)" /> method converts sequential blocks of characters into sequential blocks of bytes, in a manner similar to the <see cref="M:System.Text.ASCIIEncoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> method of this class. However, an <see cref="T:System.Text.Encoder" /> maintains state information between calls so it can correctly encode character sequences that span blocks. The <see cref="T:System.Text.Encoder" /> also preserves trailing characters at the end of data blocks and uses the trailing characters in the next encoding operation. For example, a data block might end with an unmatched high surrogate, and the matching low surrogate might be in the next data block. Therefore, <see cref="M:System.Text.ASCIIEncoding.GetDecoder" /> and <see cref="M:System.Text.ASCIIEncoding.GetEncoder" /> are useful for network transmission and file operations, because those operations often deal with blocks of data instead of a complete data stream.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Obtains an encoder that converts a sequence of Unicode characters into an ASCII encoded sequence of bytes.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An <see cref="T:System.Text.Encoder" /> that converts a sequence of Unicode characters into an ASCII encoded sequence of bytes.</para></returns></Docs></Member><Member MemberName="GetMaxByteCount"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 GetMaxByteCount(int32 charCount)" /><MemberSignature Language="C#" Value="public override int GetMaxByteCount (int charCount);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetMaxByteCount(int32 charCount) 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="charCount" Type="System.Int32" /></Parameters><Docs><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="charCount " />&lt; 0.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method calculates the exact array size required by the <see cref="M:System.Text.ASCIIEncoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> method to store the resulting bytes, whereas the <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" /> method calculates the maximum array size. The <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allocates less memory, but the <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para><para><see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" /> is a worst-case number, including the worst case for the currently selected <see cref="T:System.Text.EncoderFallback" />.  If you choose a replacement fallback with a potentially large string, <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" /> can return large values.</para><para>The <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" /> method considers potential leftover surrogates from a previous encoding operation. As a result, if the <see cref="T:System.Text.ASCIIEncoding" /> object uses the default replacement fallback, or if a custom replacement fallback has been defined with a single possible fallback character, the method returns <paramref name="charCount" /> + 1. If the <see cref="T:System.Text.ASCIIEncoding" /> object uses a replacement fallback with more than one possible fallback character, the method returns n * (<paramref name="charCount" /> + 1), where n is the maximum number of fallback characters.</para><para><see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" /> has no relation to <see cref="M:System.Text.ASCIIEncoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" />. If your application needs a similar function to use with <see cref="M:System.Text.ASCIIEncoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" />, it should use <see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" />.</para><block subset="none" type="note"><para>GetMaxByteCount(N) is not necessarily the same value as N* GetMaxByteCount(1).</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Calculates the maximum number of bytes produced by encoding the specified number of characters.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The maximum number of bytes produced by encoding the specified number of characters.</para></returns><param name="charCount"><attribution license="cc4" from="Microsoft" modified="false" />The number of characters to encode.</param></Docs><Excluded>0</Excluded></Member><Member MemberName="GetMaxCharCount"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual int32 GetMaxCharCount(int32 byteCount)" /><MemberSignature Language="C#" Value="public override int GetMaxCharCount (int byteCount);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetMaxCharCount(int32 byteCount) 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="byteCount" Type="System.Int32" /></Parameters><Docs><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="byteCount" /> &lt; 0.</exception><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Text.ASCIIEncoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" /> method calculates the exact array size required by the <see cref="M:System.Text.ASCIIEncoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> method to store the resulting characters, whereas  the <see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" /> method calculates the maximum array size. The <see cref="M:System.Text.ASCIIEncoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" /> method generally allocates less memory, while the <see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" /> method generally executes faster.</para><para><see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" /> retrieves a worst-case number, including the worst case for the currently selected <see cref="T:System.Text.DecoderFallback" />. If a decoder fallback is present that has a maximum fallback length of n, the <see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" /> method returns n * <paramref name="byteCount" />.</para><para><see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" /> has no relation to <see cref="M:System.Text.ASCIIEncoding.GetBytes(System.Char[],System.Int32,System.Int32,System.Byte[],System.Int32)" />. If your application needs a similar function to use with <see cref="M:System.Text.ASCIIEncoding.GetBytes(System.Char[],System.Int32,System.Int32,System.Byte[],System.Int32)" />, it should use <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" />.</para><block subset="none" type="note"><para>GetMaxCharCount(N) is not necessarily the same value as N* GetMaxCharCount(1).</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Calculates the maximum number of characters produced by decoding the specified number of bytes.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The maximum number of characters produced by decoding the specified number of bytes.</para></returns><param name="byteCount"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to decode.</param></Docs><Excluded>0</Excluded></Member><Member MemberName="GetString"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual string GetString(class System.Byte[] bytes)" /><MemberSignature Language="C#" Value="public override string GetString (byte[] bytes);" /><MemberType>Method</MemberType><ReturnValue><ReturnType>System.String</ReturnType></ReturnValue><Parameters><Parameter Name="bytes" Type="System.Byte[]" /></Parameters><Docs><param name="bytes"> A <see cref="T:System.Byte" /> array to decode as ASCII-encoded characters. </param><summary><para>Decodes the specified array of bytes as a string of ASCII-encoded characters. </para></summary><returns><para>A <see cref="T:System.String" /> containing the decoded representation of <paramref name="bytes" /> as ASCII-encoded
   characters.</para></returns><remarks><para><block subset="none" type="note">This method overrides <see cref="M:System.Text.Encoding.GetString(System.Byte[])" qualify="true" />.</block></para></remarks><exception cref="T:System.ArgumentNullException"><paramref name="bytes" /> is <see langword="null" />.</exception></Docs><Excluded>0</Excluded><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion></AssemblyInfo></Member><Member MemberName="GetString"><MemberSignature Language="ILASM" Value=".method public hidebysig virtual string GetString(class System.Byte[] bytes, int32 byteIndex, int32 byteCount)" /><MemberSignature Language="C#" Value="public override string GetString (byte[] bytes, int byteIndex, int byteCount);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string GetString(unsigned int8[] bytes, int32 byteIndex, int32 byteCount) 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><Parameter Name="bytes" Type="System.Byte[]" /><Parameter Name="byteIndex" Type="System.Int32" /><Parameter Name="byteCount" Type="System.Int32" /></Parameters><Docs><exception cref="T:System.ArgumentNullException"><paramref name="bytes" /> is <see langword="null" />.</exception><exception cref="T:System.ArgumentOutOfRangeException"><para><paramref name="byteIndex" /> &lt; 0.</para><para>-or-</para><para><paramref name="byteCount" /> &lt; 0.</para><para> -or-</para><para>(<paramref name="bytes" />.Length - <paramref name="byteIndex" />) &lt; <paramref name="byteCount" />. </para></exception><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The byte array containing the sequence of bytes to decode.</param><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Data to be converted, such as data read from a stream, can be available only in sequential blocks. In this case, or if the amount of data is so large that it needs to be divided into smaller blocks, the application should use the <see cref="T:System.Text.Decoder" /> or the <see cref="T:System.Text.Encoder" /> provided by the <see cref="M:System.Text.ASCIIEncoding.GetDecoder" /> method or the <see cref="M:System.Text.ASCIIEncoding.GetEncoder" /> method, respectively.</para><para><see cref="T:System.Text.ASCIIEncoding" /> does not provide error detection. Any byte greater than hexadecimal 0x7F is decoded as the Unicode question mark ("?").</para><block subset="none" type="note"><para>For security reasons, your application is recommended to use <see cref="T:System.Text.UTF8Encoding" />, <see cref="T:System.Text.UnicodeEncoding" />, or <see cref="T:System.Text.UTF32Encoding" /> and enable error detection.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Decodes a range of bytes from a byte array into a string.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A <see cref="T:System.String" /> containing the results of decoding the specified sequence of bytes.</para></returns><param name="bytes"><attribution license="cc4" from="Microsoft" modified="false" />The byte array containing the sequence of bytes to decode.</param><param name="byteIndex"><attribution license="cc4" from="Microsoft" modified="false" />The index of the first byte to decode.</param><param name="byteCount"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to decode.</param></Docs><Excluded>0</Excluded></Member><Member MemberName="IsSingleByte"><MemberSignature Language="C#" Value="public override bool IsSingleByte { get; }" /><MemberSignature Language="ILAsm" Value=".property instance bool IsSingleByte" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Docs><value>To be added.</value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Instead of using the <see cref="P:System.Text.ASCIIEncoding.IsSingleByte" /> property to determine the size of a byte array for encoding operations  and the size of a character array for decoding operations (for example, so that the size of the byte array is <see cref="P:System.Text.ASCIIEncoding.IsSingleByte" /> * the number of characters to be encoded), you should call the <see cref="M:System.Text.ASCIIEncoding.GetByteCount(System.String)" /> or <see cref="M:System.Text.ASCIIEncoding.GetMaxByteCount(System.Int32)" /> method for encoding operations and the <see cref="M:System.Text.ASCIIEncoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" /> or <see cref="M:System.Text.ASCIIEncoding.GetMaxCharCount(System.Int32)" /> method for decoding operations. These methods takes the <see cref="T:System.Text.ASCIIEncoding" /> object's replacement fallback strategy into account when calculating the required array size.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets a value indicating whether the current encoding uses single-byte code points.</para></summary></Docs></Member></Members><TypeExcluded>0</TypeExcluded></Type>