Uint16[ ] 转换成 Uint8[ ]
还有一个Uint8[ ] 转换成 Uint16[ ]
------解决方案--------------------Array.ConvertAll(source,item=>(UInt8)item);
Array.ConvertAll(source,item=>(UInt16)item);
------解决方案-------------------- private void button3_Click(object sender, EventArgs e)
{
int[] a =new int[]{1,2,3};
Converter<int, long> _Convert = new Converter<int, long>(ConvertInt);
long[] b = Array.ConvertAll(a, _Convert);
}
public long ConvertInt(int a)
{
return (long)a;
}