Z
Zaza
Hi,
I'm not expert with C# (I'm more with Java and C++). I have to work
with an existing C# code. And I have a question about this lines :
...
TCP_DATAHEADER buffer = (TCP_DATAHEADER) asyncState.buffer;
Array.Copy(asyncState.buffer, buffer.cbHeader, asyncState.buffer,
0, buffer.dwBytes - buffer.cbHeader);
string dwType = buffer.dwType;
...
What does the first line do ? A simple cast or a copy ? I think it is
a copy, because the line 2 make a copy overwriting the initiale data,
and the line 3 seems to asses to this original data ...
But I'm not sure, it's strange ...
Thanks,
Xavier
I'm not expert with C# (I'm more with Java and C++). I have to work
with an existing C# code. And I have a question about this lines :
...
TCP_DATAHEADER buffer = (TCP_DATAHEADER) asyncState.buffer;
Array.Copy(asyncState.buffer, buffer.cbHeader, asyncState.buffer,
0, buffer.dwBytes - buffer.cbHeader);
string dwType = buffer.dwType;
...
What does the first line do ? A simple cast or a copy ? I think it is
a copy, because the line 2 make a copy overwriting the initiale data,
and the line 3 seems to asses to this original data ...
But I'm not sure, it's strange ...
Thanks,
Xavier