﻿<?xml version="1.0" encoding="utf-8"?><Type Name="UTF32Encoding" FullName="System.Text.UTF32Encoding"><TypeSignature Language="C#" Value="public sealed class UTF32Encoding : System.Text.Encoding" /><TypeSignature Language="ILAsm" Value=".class public auto ansi serializable sealed beforefieldinit UTF32Encoding extends System.Text.Encoding" /><AssemblyInfo><AssemblyName>mscorlib</AssemblyName><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Base><BaseTypeName>System.Text.Encoding</BaseTypeName></Base><Interfaces /><Docs><since version=".NET 2.0" /><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>The UTF-32 encoding represents each code point as a 32-bit integer. For more information about the UTFs and other encodings supported by <see cref="N:System.Text" />, see <format type="text/html"><a href="bf6d9823-4c2d-48af-b280-919c5af66ae9">Understanding Encodings</a></format>.</para><para>The <see cref="M:System.Text.UTF32Encoding.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.UTF32Encoding.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.UTF32Encoding.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.UTF32Encoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> and <see cref="M:System.Text.UTF32Encoding.GetString(System.Byte[],System.Int32,System.Int32)" /> methods perform the actual decoding.</para><para><see cref="T:System.Text.UTF32Encoding" /> corresponds to the Windows code pages 12000 (little endian byte order) and 12001 (big endian byte order).</para><para>The encoder can use the big endian byte order (most significant byte first) or the little endian byte order (least significant byte first). For example, the Latin Capital Letter A (code point U+0041) is serialized as follows (in hexadecimal): </para><list type="bullet"><item><para>Big endian byte order: 00 00 00 41 </para></item><item><para>Little endian byte order: 41 00 00 00 </para></item></list><para>It is generally more efficient to store Unicode characters using the native byte order. For example, it is better to use the little endian byte order on little endian platforms, such as Intel computers.</para><para>The <see cref="M:System.Text.UTF32Encoding.GetPreamble" /> method retrieves an array of bytes that can include the byte order mark (BOM). If this byte array is prefixed to an encoded stream, it helps the decoder to identify the encoding format used.</para><para>For more information on byte order and the byte order mark, see The Unicode Standard at the <see cref="http://go.microsoft.com/fwlink/?LinkId=37123">Unicode home page</see>.</para><block subset="none" type="note"><para>To enable error detection and to make the class instance more secure, the application should use the <see cref="M:System.Text.UTF32Encoding.#ctor" /> constructor that takes a <paramref name="throwOnInvalidCharacters" /> parameter, and set that parameter to true. With error detection, a method that detects an invalid sequence of characters or bytes throws a <see cref="T:System.ArgumentException" />. Without error detection, no exception is thrown, and the invalid sequence is generally ignored.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Represents a UTF-32 encoding of Unicode characters.</para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public UTF32Encoding ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters /><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor creates an instance that uses the little endian byte order, provides a Unicode byte order mark, and does not throw an exception when an invalid encoding is detected.</para><block subset="none" type="note"><para>For security reasons, your applications are recommended to enable error detection by using the constructor that accepts a <paramref name="throwOnInvalidCharacters" /> parameter and setting that parameter to true.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Text.UTF32Encoding" /> class.</para></summary></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public UTF32Encoding (bool bigEndian, bool byteOrderMark);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(bool bigEndian, bool byteOrderMark) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="bigEndian" Type="System.Boolean" /><Parameter Name="byteOrderMark" Type="System.Boolean" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor creates an instance that does not throw an exception when an invalid encoding is detected.</para><block subset="none" type="note"><para>For security reasons, your applications are recommended to enable error detection by using the constructor that accepts a <paramref name="throwOnInvalidCharacters" /> parameter and setting that parameter to true.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Text.UTF32Encoding" /> class. Parameters specify whether to use the big endian byte order and whether to provide a Unicode byte order mark.</para></summary><param name="bigEndian"><attribution license="cc4" from="Microsoft" modified="false" />true to use the big endian byte order (most significant byte first), or false to use the little endian byte order (least significant byte first). </param><param name="byteOrderMark"><attribution license="cc4" from="Microsoft" modified="false" />true to specify that a Unicode byte order mark is provided; otherwise, false. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public UTF32Encoding (bool bigEndian, bool byteOrderMark, bool throwOnInvalidCharacters);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(bool bigEndian, bool byteOrderMark, bool throwOnInvalidCharacters) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="bigEndian" Type="System.Boolean" /><Parameter Name="byteOrderMark" Type="System.Boolean" /><Parameter Name="throwOnInvalidCharacters" Type="System.Boolean" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>If <paramref name="throwOnInvalidCharacters" /> is true, a method that detects an invalid byte sequence throws <see cref="T:System.ArgumentException" />. Otherwise, the method does not throw an exception, and the invalid sequence is ignored.</para><block subset="none" type="note"><para>For security reasons, your applications are recommended to use this constructor to create an instance of the <see cref="T:System.Text.UTF32Encoding" /> class and turn on error detection by setting <paramref name="throwOnInvalidCharacters" /> to true.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Text.UTF32Encoding" /> class. Parameters specify whether to use the big endian byte order, whether to provide a Unicode byte order mark, and whether to throw an exception when an invalid encoding is detected.</para></summary><param name="bigEndian"><attribution license="cc4" from="Microsoft" modified="false" />true to use the big endian byte order (most significant byte first), or false to use the little endian byte order (least significant byte first). </param><param name="byteOrderMark"><attribution license="cc4" from="Microsoft" modified="false" />true to specify that a Unicode byte order mark is provided; otherwise, false. </param><param name="throwOnInvalidCharacters"><attribution license="cc4" from="Microsoft" modified="false" />true to specify that an exception should be thrown when an invalid encoding is detected; otherwise, false. </param></Docs></Member><Member MemberName="Equals"><MemberSignature Language="C#" Value="public override bool Equals (object value);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object value) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Parameters><Parameter Name="value" Type="System.Object" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Two <see cref="T:System.Text.UTF32Encoding" /> objects are considered equal if all of the following conditions are true: </para><list type="bullet"><item><para>Both objects use the same byte order.</para></item><item><para>Both objects provide the byte order mark, or both do not.</para></item><item><para>Both objects throw an exception when encountering invalid encoding, or both do not.</para></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Determines whether the specified <see cref="T:System.Object" /> is equal to the current <see cref="T:System.Text.UTF32Encoding" /> object.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>true if <paramref name="value" /> is an instance of <see cref="T:System.Text.UTF32Encoding" /> and is equal to the current object; otherwise, false.</para></returns><param name="value"><attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Object" /> to compare with the current object. </param></Docs></Member><Member MemberName="GetByteCount"><MemberSignature Language="C#" Value="public override int GetByteCount (string s);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetByteCount(string s) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="s" Type="System.String" /></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.UTF32Encoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> to store the resulting bytes, the application uses <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" />. The <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para><para>With error detection, an invalid sequence causes this method to throw a <see cref="T:System.ArgumentException" />. Without error detection, invalid sequences are ignored, and no exception is thrown.</para><block subset="none" type="note"><para>To ensure that the encoded bytes are decoded properly, the application should prefix encoded bytes with a preamble.</para></block></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="s"><attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.String" /> containing the set of characters to encode. </param></Docs></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></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.UTF32Encoding.GetBytes(System.Char*,System.Int32,System.Byte*,System.Int32)" /> to store the resulting bytes, the application uses <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" />. The <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para><para>With error detection, an invalid sequence causes this method to throw a <see cref="T:System.ArgumentException" />. Without error detection, invalid sequences are ignored, and no exception is thrown.</para><block subset="none" type="note"><para>To ensure that the encoded bytes are decoded properly, the application should prefix encoded bytes with a preamble.</para></block></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="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>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><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.UTF32Encoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> to store the resulting bytes, the application uses <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" />. The <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para><para>With error detection, an invalid sequence causes this method to throw a <see cref="T:System.ArgumentException" />. Without error detection, invalid sequences are ignored, and no exception is thrown.</para><block subset="none" type="note"><para>To ensure that the encoded bytes are decoded properly, the application should prefix encoded bytes with a preamble.</para></block></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></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></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.UTF32Encoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> to store the resulting bytes, the application uses <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" />. The <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para><para>With error detection, an invalid sequence causes this method to throw a <see cref="T:System.ArgumentException" />. Without error detection, invalid sequences are ignored, and no exception is thrown.</para><para>Data to be converted, such as data read from a stream, might 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 uses the <see cref="T:System.Text.Decoder" /> or the <see cref="T:System.Text.Encoder" /> provided by the <see cref="M:System.Text.UTF32Encoding.GetDecoder" /> method or the <see cref="M:System.Text.UTF32Encoding.GetEncoder" /> method, respectively.</para><block subset="none" type="note"><para>To ensure that the encoded bytes are decoded properly, the application should prefix encoded bytes with a preamble.</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 the <paramref name="bytes" /> parameter.</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="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>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><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.UTF32Encoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> to store the resulting bytes, the application uses <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" />. The <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para><para>With error detection, an invalid sequence causes this method to throw a <see cref="T:System.ArgumentException" />. Without error detection, invalid sequences are ignored, and no exception is thrown.</para><para>Data to be converted, such as data read from a stream, might 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 uses the <see cref="T:System.Text.Decoder" /> or the <see cref="T:System.Text.Encoder" /> provided by the <see cref="M:System.Text.UTF32Encoding.GetDecoder" /> method or the <see cref="M:System.Text.UTF32Encoding.GetEncoder" /> method, respectively.</para><block subset="none" type="note"><para>To ensure that the encoded bytes are decoded properly, the application should prefix encoded bytes with a preamble.</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></Member><Member MemberName="GetBytes"><MemberSignature Language="C#" Value="public override int GetBytes (string s, int charIndex, int charCount, byte[] bytes, int byteIndex);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetBytes(string s, int32 charIndex, int32 charCount, unsigned int8[] bytes, int32 byteIndex) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters><Parameter Name="s" 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><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.UTF32Encoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> to store the resulting bytes, the application uses <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" />. The <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para><para>With error detection, an invalid sequence causes this method to throw a <see cref="T:System.ArgumentException" />. Without error detection, invalid sequences are ignored, and no exception is thrown.</para><para>Data to be converted, such as data read from a stream, might 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 uses the <see cref="T:System.Text.Decoder" /> or the <see cref="T:System.Text.Encoder" /> provided by the <see cref="M:System.Text.UTF32Encoding.GetDecoder" /> method or the <see cref="M:System.Text.UTF32Encoding.GetEncoder" /> method, respectively.</para><block subset="none" type="note"><para>To ensure that the encoded bytes are decoded properly, the application should prefix encoded bytes with a preamble.</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="s"><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></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></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.UTF32Encoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> to store the resulting characters, use <see cref="M:System.Text.UTF32Encoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.UTF32Encoding.GetMaxCharCount(System.Int32)" />. The <see cref="M:System.Text.UTF32Encoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.UTF32Encoding.GetMaxCharCount(System.Int32)" /> method generally executes faster.</para><para>With error detection, an invalid sequence causes this method to throw a <see cref="T:System.ArgumentException" />. Without error detection, invalid sequences are ignored, and no exception is thrown.</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="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>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><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.UTF32Encoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> to store the resulting characters, the application uses <see cref="M:System.Text.UTF32Encoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.UTF32Encoding.GetMaxCharCount(System.Int32)" />. The <see cref="M:System.Text.UTF32Encoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.UTF32Encoding.GetMaxCharCount(System.Int32)" /> method generally executes faster.</para><para>With error detection, an invalid sequence causes this method to throw a <see cref="T:System.ArgumentException" />. Without error detection, invalid sequences are ignored, and no exception is thrown.</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></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></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.UTF32Encoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> to store the resulting characters, the application uses <see cref="M:System.Text.UTF32Encoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.UTF32Encoding.GetMaxCharCount(System.Int32)" />. The <see cref="M:System.Text.UTF32Encoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.UTF32Encoding.GetMaxCharCount(System.Int32)" /> method generally executes faster.</para><para>With error detection, an invalid sequence causes this method to throw a <see cref="T:System.ArgumentException" />. Without error detection, invalid sequences are ignored, and no exception is thrown.</para><para>Data to be converted, such as data read from a stream, might 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 uses the <see cref="T:System.Text.Decoder" /> or the <see cref="T:System.Text.Encoder" /> provided by the <see cref="M:System.Text.UTF32Encoding.GetDecoder" /> method or the <see cref="M:System.Text.UTF32Encoding.GetEncoder" /> method, respectively.</para></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="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>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><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.UTF32Encoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> to store the resulting characters, the application uses <see cref="M:System.Text.UTF32Encoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.UTF32Encoding.GetMaxCharCount(System.Int32)" />. The <see cref="M:System.Text.UTF32Encoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.UTF32Encoding.GetMaxCharCount(System.Int32)" /> method generally executes faster.</para><para>With error detection, an invalid sequence causes this method to throw a <see cref="T:System.ArgumentException" />. Without error detection, invalid sequences are ignored, and no exception is thrown.</para><para>Data to be converted, such as data read from a stream, might 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 uses the <see cref="T:System.Text.Decoder" /> or the <see cref="T:System.Text.Encoder" /> provided by the <see cref="M:System.Text.UTF32Encoding.GetDecoder" /> method or the <see cref="M:System.Text.UTF32Encoding.GetEncoder" /> method, respectively.</para></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></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><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.UTF32Encoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> method. 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.UTF32Encoding.GetDecoder" /> and <see cref="M:System.Text.UTF32Encoding.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><para>If error detection is enabled, that is, the <paramref name="throwOnInvalidCharacters" /> parameter of the constructor was set to true, error detection is also enabled in the <see cref="T:System.Text.Decoder" /> returned by this method. If error detection is enabled and an invalid sequence is encountered, the state of the decoder is undefined and processing must stop.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Obtains a decoder that converts a UTF-32 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 a UTF-32 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><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.UTF32Encoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> method. However, a <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.UTF32Encoding.GetDecoder" /> and <see cref="M:System.Text.UTF32Encoding.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><para>If error detection is enabled, that is, the <paramref name="throwOnInvalidCharacters" /> parameter of the constructor was set to true, error detection is also enabled in the <see cref="T:System.Text.Encoder" /> returned by this method. If error detection is enabled and an invalid sequence is encountered, the state of the encoder is undefined and processing must stop.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Obtains an encoder that converts a sequence of Unicode characters into a UTF-32 encoded sequence of bytes.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A <see cref="T:System.Text.Encoder" /> that converts a sequence of Unicode characters into a UTF-32 encoded sequence of bytes.</para></returns></Docs></Member><Member MemberName="GetHashCode"><MemberSignature Language="C#" Value="public override int GetHashCode ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Int32</ReturnType></ReturnValue><Parameters /><Docs><remarks>To be added.</remarks><since version=".NET 2.0" /><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns the hash code for the current instance.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The hash code for the current <see cref="T:System.Text.UTF32Encoding" /> object.</para></returns></Docs></Member><Member MemberName="GetMaxByteCount"><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>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><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.UTF32Encoding.GetBytes(System.String,System.Int32,System.Int32,System.Byte[],System.Int32)" /> to store the resulting bytes, the application uses <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" />. The <see cref="M:System.Text.UTF32Encoding.GetByteCount(System.Char[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" /> method generally executes faster.</para><para><see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" /> is a worst-case number, including the worst case for the currently selected <see cref="T:System.Text.EncoderFallback" />. If a fallback is chosen with a potentially large string, M <see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" /> can return large values.</para><para>In most cases, this method returns reasonable numbers for small strings. For large strings, you might have to choose between using very large buffers and catching errors in the rare case that a more reasonable buffer is exceeded. You might also want to consider a different approach and use <see cref="Overload:System.Text.UTF32Encoding.GetByteCount" /> or <see cref="Overload:System.Text.Encoder.Convert" />.</para><para><see cref="M:System.Text.UTF32Encoding.GetMaxByteCount(System.Int32)" /> has no relation to <see cref="M:System.Text.UTF32Encoding.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.UTF32Encoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" />, it should use <see cref="M:System.Text.UTF32Encoding.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></Member><Member MemberName="GetMaxCharCount"><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>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><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.UTF32Encoding.GetChars(System.Byte[],System.Int32,System.Int32,System.Char[],System.Int32)" /> to store the resulting characters, the application uses <see cref="M:System.Text.UTF32Encoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" />. To calculate the maximum array size, the application should use <see cref="M:System.Text.UTF32Encoding.GetMaxCharCount(System.Int32)" />. The <see cref="M:System.Text.UTF32Encoding.GetCharCount(System.Byte[],System.Int32,System.Int32)" /> method generally allows allocation of less memory, while the <see cref="M:System.Text.UTF32Encoding.GetMaxCharCount(System.Int32)" /> method generally executes faster.</para><para><see cref="M:System.Text.UTF32Encoding.GetMaxCharCount(System.Int32)" /> is a worst-case number, including the worst case for the currently selected <see cref="T:System.Text.DecoderFallback" />. If a fallback is chosen with a potentially large string, <see cref="M:System.Text.UTF32Encoding.GetMaxCharCount(System.Int32)" /> can return large values.</para><para>In most cases, this method returns reasonable numbers for small strings. For large strings, you might have to choose between using very large buffers and catching errors in the rare case that a more reasonable buffer is exceeded. You might also want to consider a different approach and use <see cref="Overload:System.Text.UTF32Encoding.GetCharCount" /> or <see cref="Overload:System.Text.Decoder.Convert" />.</para><para><see cref="M:System.Text.UTF32Encoding.GetMaxCharCount(System.Int32)" /> has no relation to <see cref="M:System.Text.UTF32Encoding.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.UTF32Encoding.GetBytes(System.Char[],System.Int32,System.Int32,System.Byte[],System.Int32)" />, it should use <see cref="M:System.Text.UTF32Encoding.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></Member><Member MemberName="GetPreamble"><MemberSignature Language="C#" Value="public override byte[] GetPreamble ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance unsigned int8[] GetPreamble() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Byte[]</ReturnType></ReturnValue><Parameters /><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Optionally, the <see cref="T:System.Text.UTF32Encoding" /> object provides a preamble, which is an array of bytes that can be prefixed to the sequence of bytes resulting from the encoding process. If the preamble contains a byte order mark (code point U+FEFF), it helps the decoder determine the byte order and the transformation format or UTF. The Unicode byte order mark is serialized as follows (in hexadecimal): </para><list type="bullet"><item><para>Big endian byte order: 00 00 FE FF </para></item><item><para>Little endian byte order: FF FE 00 00 </para></item></list><para>Your applications are recommended to use the BOM, as it provides nearly certain identification of an encoding for files that otherwise have lost reference to the UTF32Encoding object, for example, untagged or improperly tagged web data or random text files stored when a business did not have international concerns or other data. Often user problems might be avoided if data is consistently and properly tagged.  </para><para>For standards that provide an encoding type, a BOM is somewhat redundant. However, it can be used to help a server send the correct encoding header. Alternatively, it can be used as a fallback in case the encoding is otherwise lost.  </para><para>There are some disadvantages to using a BOM. For example, knowing how to limit the database fields that use a BOM can be difficult. Concatenation of files can be a problem also, for example, when files are merged in such a way that an unnecessary character can end up in the middle of data. In spite of the few disadvantages, however, the use of a BOM is highly recommended.</para><para>For more information on byte order and the byte order mark, see The Unicode Standard at the <see cref="http://go.microsoft.com/fwlink/?LinkId=37123">Unicode home page</see>.</para><block subset="none" type="note"><para>To ensure that the encoded bytes are decoded properly, your application should prefix encoded bytes with a preamble. </para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns a Unicode byte order mark encoded in UTF-32 format, if the constructor for this instance requests a byte order mark.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A byte array containing the Unicode byte order mark, if the constructor for this instance requests a byte order mark. Otherwise, this method returns a byte array of length zero.</para></returns></Docs></Member><Member MemberName="GetString"><MemberSignature Language="C#" Value="public override string GetString (byte[] bytes, int index, int count);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string GetString(unsigned int8[] bytes, int32 index, int32 count) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><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="index" Type="System.Int32" /><Parameter Name="count" Type="System.Int32" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>With error detection, an invalid sequence causes this method to throw a <see cref="T:System.ArgumentException" />. Without error detection, invalid sequences are ignored, and no exception is thrown.</para><para>Data to be converted, such as data read from a stream, might 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.UTF32Encoding.GetDecoder" /> method or the <see cref="M:System.Text.UTF32Encoding.GetEncoder" /> method, respectively.</para></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="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></Member></Members></Type>