﻿<?xml version="1.0" encoding="utf-8"?><Type Name="Buffer" FullName="System.Buffer"><TypeSignature Maintainer="auto" Language="C#" Value="public static class Buffer" /><TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit Buffer extends System.Object" /><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><ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the &lt;link location="node:gtk-sharp/programming/threads"&gt;Gtk# Thread Programming&lt;/link&gt; for details.</ThreadSafetyStatement><Base><BaseTypeName>System.Object</BaseTypeName></Base><Interfaces /><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName></Attribute></Attributes><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para><see cref="T:System.Buffer" /> only affects arrays of primitive types; this class does not apply to objects. Each primitive type is treated as a series of bytes without regard to any behavior or limitation associated with the primitive type.</para><para><see cref="T:System.Buffer" /> provides methods to copy bytes from one array of primitive types to another array of primitive types, get a byte from an array, set a byte in an array, and obtain the length of an array. This class provides better performance for manipulating primitive types than similar methods in the <see cref="T:System.Array" /> class.</para><para><see cref="T:System.Buffer" /> is applicable to the following primitive types: <see cref="T:System.Boolean" />, <see cref="T:System.Char" />, <see cref="T:System.SByte" />, <see cref="T:System.Byte" />, <see cref="T:System.Int16" />, <see cref="T:System.UInt16" />, <see cref="T:System.Int32" />, <see cref="T:System.UInt32" />, <see cref="T:System.Int64" />, <see cref="T:System.UInt64" />, <see cref="T:System.IntPtr" />, <see cref="T:System.UIntPtr" />, <see cref="T:System.Single" />, and <see cref="T:System.Double" />.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Manipulates arrays of primitive types.</para></summary></Docs><Members><Member MemberName="BlockCopy"><MemberSignature Language="C#" Value="public static void BlockCopy (Array src, int srcOffset, Array dst, int dstOffset, int count);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig void BlockCopy(class System.Array src, int32 srcOffset, class System.Array dst, int32 dstOffset, 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.Void</ReturnType></ReturnValue><Parameters><Parameter Name="src" Type="System.Array" /><Parameter Name="srcOffset" Type="System.Int32" /><Parameter Name="dst" Type="System.Array" /><Parameter Name="dstOffset" Type="System.Int32" /><Parameter Name="count" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This method copies <paramref name="count" /> bytes from <paramref name="src" />, beginning at <paramref name="srcOffset" />, to <paramref name="dst" />, beginning at <paramref name="dstOffset" />. Both <paramref name="srcOffset" /> and <paramref name="dstOffset" /> are zero-based; that is, the first byte in each buffer is at position 0, not position 1.</para><para>The <see cref="M:System.Buffer.BlockCopy(System.Array,System.Int32,System.Array,System.Int32,System.Int32)" /> method accesses the bytes in the <paramref name="src" /> parameter array using offsets into memory, not programming constructs such as indexes or upper and lower array bounds. For example, if in the programming language of your application you declare an <see cref="T:System.Int32" /> array with a zero-based lower bound of -50, and then pass the array and an offset of 5 to the <see cref="M:System.Buffer.BlockCopy(System.Array,System.Int32,System.Array,System.Int32,System.Int32)" /> method, the first array element the method will access is the second element of the array, which is at index -49. Furthermore, which byte of array element -49 is accessed first depends on the endianness of the computer that is executing your application.</para><para>As its name suggests, the <see cref="M:System.Buffer.BlockCopy(System.Array,System.Int32,System.Array,System.Int32,System.Int32)" /> method copies a block of bytes as a whole, rather than copying one byte at a time. Therefore, if <paramref name="src" /> and <paramref name="dst" /> reference the same array, and the range from <paramref name="srcOffset" /> + <paramref name="count" /> -1 overlaps the range from <paramref name="dstOffset" /> + <paramref name="count" /> - 1, the values of the overlapping bytes are not overwritten before they are copied to the destination. In the following example, the values of bytes 0-16 in an array named arr are copied to bytes 12-28. Despite the overlapping range, the values of the source bytes are successfully copied.</para><para>code reference: System.Buffer.BlockCopy#3</para><para>In the following example, the values of bytes 12-28 in an array named arr are copied to bytes 0-16. Again, despite the overlapping range, the values of the source bytes are successfully copied.</para><para>code reference: System.Buffer.BlockCopy#4</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Copies a specified number of bytes from a source array starting at a particular offset to a destination array starting at a particular offset.</para></summary><param name="src"><attribution license="cc4" from="Microsoft" modified="false" />The source buffer. </param><param name="srcOffset"><attribution license="cc4" from="Microsoft" modified="false" />The zero-based byte offset into <paramref name="src" />. </param><param name="dst"><attribution license="cc4" from="Microsoft" modified="false" />The destination buffer. </param><param name="dstOffset"><attribution license="cc4" from="Microsoft" modified="false" />The zero-based byte offset into <paramref name="dst" />. </param><param name="count"><attribution license="cc4" from="Microsoft" modified="false" />The number of bytes to copy. </param></Docs></Member><Member MemberName="ByteLength"><MemberSignature Language="C#" Value="public static int ByteLength (Array array);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 ByteLength(class System.Array array) 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="array" Type="System.Array" /></Parameters><Docs><remarks /><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns the number of bytes in the specified array.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>The number of bytes in the array.</para></returns><param name="array"><attribution license="cc4" from="Microsoft" modified="false" />An array. </param></Docs></Member><Member MemberName="GetByte"><MemberSignature Language="C#" Value="public static byte GetByte (Array array, int index);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig unsigned int8 GetByte(class System.Array array, int32 index) 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.Byte</ReturnType></ReturnValue><Parameters><Parameter Name="array" Type="System.Array" /><Parameter Name="index" Type="System.Int32" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The GetByte method gets a particular byte out of the array. The array must be an array of primitives.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Retrieves the byte at a specified location in a specified array.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns the <paramref name="index" /> byte in the array.</para></returns><param name="array"><attribution license="cc4" from="Microsoft" modified="false" />An array. </param><param name="index"><attribution license="cc4" from="Microsoft" modified="false" />A location in the array. </param></Docs></Member><Member MemberName="SetByte"><MemberSignature Language="C#" Value="public static void SetByte (Array array, int index, byte value);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig void SetByte(class System.Array array, int32 index, unsigned int8 value) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="array" Type="System.Array" /><Parameter Name="index" Type="System.Int32" /><Parameter Name="value" Type="System.Byte" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para><paramref name="array" /> must be an array of primitives.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Assigns a specified value to a byte at a particular location in a specified array.</para></summary><param name="array"><attribution license="cc4" from="Microsoft" modified="false" />An array. </param><param name="index"><attribution license="cc4" from="Microsoft" modified="false" />A location in the array. </param><param name="value"><attribution license="cc4" from="Microsoft" modified="false" />A value to assign. </param></Docs></Member></Members></Type>