de2bd2f9
“wangming”
项目初始化
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
using NCC.Dependency;
using System;
namespace NCC.Common.Collections
{
/// <summary>
/// 数组扩展方法
/// </summary>
[SuppressSniffer]
public static class ArrayExtensions
{
/// <summary>
/// 复制一份二维数组的副本
/// </summary>
public static byte[,] Copy(this byte[,] bytes)
{
int width = bytes.GetLength(0), height = bytes.GetLength(1);
byte[,] newBytes = new byte[width, height];
Array.Copy(bytes, newBytes, bytes.Length);
return newBytes;
}
}
}
|