Clone a byte array : Binary Bit « Data Types « C# / C Sharp






Clone a byte array

  
//http://www.bouncycastle.org/
//MIT X11 License


using System;
using System.Text;

namespace Org.BouncyCastle.Utilities
{

    /// <summary> General array utilities.</summary>
    public sealed class Arrays
    {
        private Arrays()
        {
        }


    public static byte[] Clone(byte[] data)
    {
      return data == null ? null : (byte[]) data.Clone();
    }

    public static int[] Clone(int[] data)
    {
      return data == null ? null : (int[]) data.Clone();
    }
  }
}

   
    
  








Related examples in the same category

1.Using the Bitwise Complement Operators with Various Data TypesUsing the Bitwise Complement Operators with Various Data Types
2.Obtaining the Most Significant or Least Significant Bits of a NumberObtaining the Most Significant or Least Significant Bits of a Number
3.Binary Data TestBinary Data Test
4.Binary Network Byte OrderBinary Network Byte Order
5.Int binary
6.Get hash code for a byte array
7.Count the number of bit
8.Bit Helper
9.Bit shifting for int and long value
10.Returns how many bits are necessary to hold a certain number