c# 重写 c++ 程序笔记:数据初始化

Fork Me On Github

c# 重写 c++ 程序笔记:数据初始化

std::uint32_t 初始化

c++ 数组定义

std::array<std::uint32_t, 7> data;

转成c# 数组


var data = new uint[7];

for (int i = 0; i < 7; i++)
{
    data[i] = 0xcccccccc;
}

std::uint8_t 初始化

c++ 数组定义

std::array<std::uint8_t, 7> data;

转成c# 数组


var data = new byte[7];

for (int i = 0; i < 7; i++)
{
    data[i] = 0xcc;
}
Click here to view
0 61 0