0 c#
我正在尝试创建一个支持4个参数的函数,但它不起作用.我怎么解决这个问题?谢谢.
private void Byte(byte a, byte b, uint c, byte d)
{
PS3.SetMemory(a + b * c, new byte[] { d });
}
Byte(0x00f474e3 + 0x3700 * dataGridView1.CurrentRow.Index, new byte[] { 0x03 });
Run Code Online (Sandbox Code Playgroud)
错误:
Run Code Online (Sandbox Code Playgroud)Error: No overload for 'Byte' method takes two arguments
发送参数时,您不需要执行计算.
我想你想这样做:
Byte(0x00f474e3,0x3700 , dataGridView1.CurrentRow.Index , 0x03);
Run Code Online (Sandbox Code Playgroud)
要么
你可以通过wrting asbelow来简单地避免使用Byte()函数:
PS3.SetMemory(0x00f474e3 + 0x3700 * dataGridView1.CurrentRow.Index,
new byte[] { 0x03 });
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
80 次 |
| 最近记录: |