就像下面这段C代码,遍历一个数组里的内容:
void func(double *head, int count)
{
int i = 0;
for(i = 0; i < count; ++i, ++head)
{
*head += 2.0;
}
}C#里能否也这样:
method(ref double head, int count)
{
//遍历以head为起始地址的大小为count的数组
}
void func(double *head, int count)
{
int i = 0;
for(i = 0; i < count; ++i, ++head)
{
*head += 2.0;
}
}C#里能否也这样:
method(ref double head, int count)
{
//遍历以head为起始地址的大小为count的数组
}
解决方案 »
- 数据导出EXCEL出错,希望知道的大大帮忙解决一下~谢谢
- c# toolStrip中的按钮toolStripButton设置图片问题
- linq中查datatable中的数据后怎么能最简单的生成另一个datatable
- printdocument.print()打印datagridview有很多数据没打出来,为什么?
- winfor问题
- socket多线程求解
- 帮忙看看c#windows窗体应用程序连接数据库的代码,连接不成功
- listview上checkbox问题
- TcpClient获取网页数据问题
- 模拟网页登录 YouTube 并发布评论
- 更改timer的Interval属性的问题(有代码)
- 一个 comboBox 里面没有邦定任何值 ,如何对它作判断啊!(即判断它里面有没有值)
fixed()
{
}
{
for(int i=0;i<array.Length;i++)
{
Console.WriteLine(array[i]);
}
}
unsafe
{
}
之中呀,因为,c#这可以真接使用指针呀。