 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Buffer BlockCopy in C#
It copies the bytes from one byte array to another byte array.
Example
using System; class Demo {    static void Main() {       // byte arrays       byte[] b1 = new byte[] {55, 66, 77, 88, 99};       byte[] b2 = new byte[8];       // copying bytes from one to another       Buffer.BlockCopy(b1, 0, b2, 0, 5);       /* calling the method with the byte array b2 that has the copied elements */       bufferFunc(b2);    }    static void bufferFunc(byte[] a) {       for (int j = 0; j < a.Length; j++) {          Console.Write(a[j]);       }       Console.WriteLine();    } }  Output
5566778899000
Advertisements
 